I am trying to put together a large query that produces almost 130 columns, and some of those columns are just calculated values from columns that are just extracted data. For example, I am creating columns 1 and 2 by extracting data from a table, and column 3 is the sum of columns 1 and 2. To do this, I am giving columns 1 and 2 aliases, and attempting to calculate column 3 by referencing these aliases.
When I try to compile a stored procedure that has this query in it, I get the error:
PL/SQL: ORA-00904: "RRPAW": invalid identifier
so I know that Oracle isn't going to let me use the aliases in the calculation. The 3 lines that are relevant to the error above are:
Unfortunately not. I tried parentheses in various places hoping that this would fix things. I even tried removing the line where the error occurred to see if an error still occurred, but the error simply moved to the next statement with an alias error.
Using subqueries is going to be a huge performance hit on this stored procedure as it has 126 columns being produced, so I would like to look for a solution that avoided this. Thanks for the suggestion though.