Skip to Main Content

Analytics Software

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!

Error in Creating temperory tables

984374Feb 17 2013 — edited Feb 18 2013
Hi All,In my process i am creating some temp tables in run time ,if process execution fails in only few temp tables are created,t will again throw error as table already exists,so i need to check the table was existed or not ,if table exists then i need to drop and create new temp table for that i wrote below case statement in procedure but i will throwing error as missing expression,please suggest me is it right if its wrong guide me the other alternatives ,Thanks in Advance...

SELECT CASE WHEN TABLE AS TEMP1 THEN DROP TABLE TEMP1
ELSE
CREATE TABLE TEMP1 AS SELECT COL1,COL2,COL3 FROM XYZ
END
FROM DUAL
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2013
Added on Feb 17 2013
2 comments
104 views