-
Can I use a variable name in a select statement inside a PL/SQL block. I was wondering if I could pass a variable name for the tablename in a select query.
Thanks in advance for any help.
-
Sure you can. You will have to use a feature called Native Dynamic SQL. See ( [url]http://www.oracle.com/oramag/oracle/00-nov/o60sql.html[/url] )
Jeff Hunter
-
Thank you.
That was an interesting URL that you had pointed to. That could have satisfied my requirements, had we been using ORacle8i. Is it available on 8.0? It doesn't seem to recognize the 'EXECUTE IMMEDIATE' command. Or is there something that I am missing. Or is there specific setup needed to use this feature?
-
see whether your version has DBMS_SQL package, which supports dynamic sql including DDLs.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|