Hi Friends,
is there a solution on 11i or 12c DB's to get the table and column names of the result columns from a complex SQL text ?
Here a little demo:
Input::
select a.cola,
b.coly alias_b.colb,
(select x.colx from tablex) alias_x.colx
from tablea a,
(select coly from tabley y where a.id=y.taby_a) b
where a.id exists (select 1 from tablex x where x.id=a.taba_x
/
Output::
table column
-------------
tablea cola
tablex colx
tabley coly
I have seen a solution a while ago ..
One possibility would be with util_xml but this goes only for non-complex SQL's.
Many thanks.