Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Dynamic Query

474835Feb 24 2006 — edited Feb 24 2006
Hi All,

I have a requirement in which the tables in which I have to insert the rows are different.

I am writing a package that contains about 25 procedures. What I will have to do is insert into one of the two records based upon the programming logic.

As a solution I have taken gl_TableName as a global variable whose value I will change depemding upon in which table I wish to insert.

I want help regarding how to take the value of tablename from a variable in a select statement.

Will
INSERT INTO gl_TableName VALUES(VAL1,VAL2);
work?

Regards,
Amit
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 24 2006
Added on Feb 24 2006
12 comments
410 views