Title: Dynamic cursor in PL/SQL

Hi gurus,
I have to do a stored proc to compare the data of two tables in different schemas. I want to use a dynamic cursor and select the content of a table passed in argument.

I saw in a document that I can work with REF CURSOR like this instance:
schema_table := 'DIFF';
open schema_comp for
'select * from TABLE where table_name = :s' using schema_table;

It works with the WHERE clause, but I want to use the FROM clause. I tried the following, but it was unsuccessful:
schema_table := 'TABLE_DIFF';
open schema_comp for
'select * from :s' using schema_table;
Has anyone ever tried this?

TIA
-----------------
Luc Demanche
CETELEM
Tél.: 01-46-39-14-49
Fax : 01-46-39-59-88

Reply via email to