Home » RDBMS Server » Server Administration » extracting table name from variable
extracting table name from variable [message #369804] Fri, 13 October 2000 11:00 Go to next message
Jenny Brotz
Messages: 1
Registered: October 2000
Junior Member
I am attempting to declare a cursor which would get the table name for the FROM clause from a variable. We have the same table in multiple instances, so I am passing the table location @xxxx to the procedure, then combining the table name with it. However, I keep getting an error, because it is interpreting the variable name as the table name. Is there any way to make this work??
Re: extracting table name from variable [message #369809 is a reply to message #369804] Mon, 16 October 2000 19:20 Go to previous message
Andrew again...
Messages: 270
Registered: July 2000
Senior Member
Sounds like you are not using dynamic SQL which is what you need - if I understand you correctly. If you are on Ora 8i, try the execute immediate rather than earlier syntax.

See "Native Dynamic SQL" in PL/SQL User's Guide and Reference Release 8.1.5
Previous Topic: search for & in a string
Next Topic: Error Messages
Goto Forum:
  


Current Time: Sun Dec 22 15:10:17 CST 2024