Error in Creating temperory tables
984374Feb 17 2013 — edited Feb 18 2013Hi 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