I've been trying to perform the following SELECT command to select a reference.
SELECT REF(Q) FROM ((SELECT id FROM A)UNION ALL(SELECT id FROM B)) Q WHERE id='13';
But it always return this error:
ORA-00904: "Q": invalid identifier
I've been stuck trying to solve this with no luck, using "(select...) AS Q" returns error as well, and all other questions related to this are related to the column problem rather than the table aliasing problem.
Is it possible to alias the table, so that I can extract a reference to one of the objects that was selected? Or do I have to create a new table to store both A and B objects, then REF from that? I'd prefer keeping them separate if possible, as they have different attributes even though they are types created under the same type.
Thank you very kindly for any answer.