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!

DDL and DML in Procedures

468937Nov 15 2005 — edited Nov 15 2005
Hi,

I am new to Oracle and am having some difficulty jumping over from MSSQL. My question is how would one simply do the following:

Drop a table if it exists, create it if it doesn't.
Then fill the table with a set of data.
(All from within a stored procedure)

In MSSQL this is very easy and straight forward. I am having a heck of a time making it work in Oracle.

I've tried Execute Immediate and it doesn't seem to work. To make the problem worse, I cannot even compile the stored procedure in Toad because the idividual inserts fail (table has not been created prior to compile).

Thanks for any help.
Rob
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 13 2005
Added on Nov 15 2005
18 comments
1,658 views