Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL problem
Hi
in order to execute the output you have to spool it to a file and then run
the file.
e.g.
create a file dynamic.sql as follows
set pages 0
set feedback off
spool result.sql
select 'select * from <SchemaOwner>.' || table_name || ';'
from dba_tables
where table_name like '%TPFHT';
/
spool off
set feedback on
set pages 30
@result.sql
then run dynamic.sql
HTH
Conan
Johannes wrote in message <8p5fpb$c6tvb$1_at_ID-3532.news.cis.dfn.de>...
>Hi everybody,
>
>does anyone know the reason why following statment produces just a
>string-output, but is
>not executed?
>
>entered statement: select 'select * from <SchemaOwner>.' || table_name ||
>';' from dba_tables where table_name like
>'%TPFHT';
>
>output-string: select * from <SchemaOwner>.xyzTPFHT;
>
>
>Thanx for every tip!
>
>Bye
>Johannes
>
>
Received on Wed Sep 06 2000 - 09:32:13 CDT
![]() |
![]() |