Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: generating SQL in SQL
>>
I am trying to generate SQL select statements dynamically through a
select. What I have is:
select "select """||table_name||""", count(*) from "||table_name||";"
from all_tables
where table_name = 'foo';
The statement I am trying to get out of this is:
select "foo", count(*) from foo;
I get the following error...
select "select """||table_name||""", count(*) from "||table_name||";" <<
I believe the problem is that the " after the
count(*) from
is being interpreted as the closing " Received on Wed Oct 27 1999 - 12:58:33 CDT