Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: A Real Dynamic Problem For Real Dynamic Developers!!
There are neater answers but a quick way would be to issue the following in
sql*plus
set head off feed off pages 0
spool username.sql
select 'select '''||table_name||''',user_name from '||table_name||';'
from user_tables;
spool off
@username.sql
Niall
"Jaboos" <safena_at_hotmail.com> wrote in message
news:220529d7.0110061109.75469779_at_posting.google.com...
> Hi All,
> I'm facing a real problem here, and I would be gratefull if someone
> can help me. The problem is as follows:
>
> 1. I'm having a database application consist of 180 (One Hundred
> Eighty) tables!
> 2. There is a column that exist on each one of those 180 tables. This
> column called 'User_Name'.
>
> My question is: How can I retreive the data from that column
> (User_Name) from all the 180 tables, using Reports or Forms (PL/SQL)?
> Or maybe using a single (sort of) query!
>
> NB: It's tedious to write the same sql query for each of the 180
> tables.
>
> The result might look like this:
>
> Table_Name User_Name
> ---------------------------------------- ----------------------
> Table_One User_One
> Table_Two User_Two
> Table_Three User_Three
> Table_Four User_Four
> ...
> ...
> etc.
>
> Best Regards,
> Jaboos
Received on Sun Oct 07 2001 - 12:11:33 CDT
![]() |
![]() |