I have encountered a very strange situation. I have a procedure that checks if a table name exists, if it does, it drops and re-create the table, else just create it. Following is the code : SELECT COUNT(*)
WHERE TABLE_NAME = 'X';
IF (V_TABLE_EXIST = 1) THEN
EXECUTE IMMEDIATE 'DROP TABLE X';
ELSIF (V_TABLE_EXIST = 0) THEN
'CREATE TABLE X
Strange thing is that this all works fine, untill I try and insert data into this new table, then I get a message that the table does not exists, and only when the table gets created and it did not exist before, else the insert works fine.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.
Your password has been sent to:email@example.com
To follow this tag...
Thanks! We'll email you when relevant content is added and updated.
Share this item with your network: