Re: do desc on tables, dump output to text file

From: <Joey.Dantoni_at_gmail.com>
Date: Tue, 18 Nov 2008 07:03:07 -0800 (PST)
Message-ID: <f01081dc-65f2-4e92-b6ca-87e695b46a49@s9g2000prm.googlegroups.com>


On Nov 12, 9:54 am, Ed Prochak <edproc..._at_gmail.com> wrote:
> On Nov 12, 9:13 am, pantagruel <rasmussen.br..._at_gmail.com> wrote:
>
> > As per the subject line, I have a comma seperated list of table names.
> > Not every table necessarily exists but they most probably do, I want
> > to run desc on each one of them and catch the output into a text file.
> > Part of my reasons for doing what is probably a much simpler operation
> > via some other method is my beginner status where Oracle is
> > concerned.
>
> > So if you can show me a simpler way to do it tell me.
>
> > Thanks
>
> something simpler than
>
> SPOOL reportfile
> DESC table1
> DESC table2
> SPOOL OFF
>
> ?????????????

There is the ever popular:

set hea off
set echo off
spool scriptfile.sql
select 'spool reportfile' from dual;
select 'desc '||table_name||from dba_tables where owner='$OWNER'; spool off
@@scriptfile Received on Tue Nov 18 2008 - 09:03:07 CST

Original text of this message