Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Dynamic sql help needed
Hi All,
In my PL SQL script I have 2 cursors. The first one gets a table_name and
the 2nd one get 2
fields(field1 and field2). What I would like to do is build dynamic sql
using these variables. What I need
is to build a 3rd cursor using the table_name,field1 and field2 from the
first 2 cursors.
For example SELECT COUNT(*)
FROM table_name WHERE col1 = field1 AND col2 = field2;
I cannot seem to find an example where the table_name is dynamic.
Thanks Received on Tue Aug 29 2000 - 11:19:05 CDT