... at least I think this is a problem.
I am writing a function that contains a cursor declaration that accesses a table where one of the columns is the reserved word NUMBER (yes, I know ..). This function got into a problem during compilation:
Error (16.10): PL / SQL: ORA-06552: PL / SQL: compilation module analysis completed ORA-06553: PLS-488: invalid variable declaration: object "NUMBER" must be a type or subtype
MY code looks something like this:
CURSOR my_cur IS SELECT "NUMBER", col2, col3 FROM tb1_x;
To make sure this is a problem, I changed the code to
CURSOR my_cur IS SELECT 'NUMBER', 'col2', 'col3' FROM dual;
and it compiled in order, but obviously this is not what I want.
Unfortunately, I have no way to change the column name (sigh), but for the record
SELECT "NUMBER", col2, col3 FROM tb1_x;
works fine with normal SQL execution.
Anyway, can I get around this problem? Any help is much appreciated!