Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: generating SQL in SQL

Re: generating SQL in SQL

From: Alan Shein <alanshein_at_erols.com>
Date: Wed, 27 Oct 1999 13:58:33 -0400
Message-ID: <7v7eeh$kts$1@autumn.news.rcn.net>


>>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US