By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,787 Members | 2,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,787 IT Pros & Developers. It's quick & easy.

how to ignore errors when creating stored procedure?

P: 2
I have a very very annoying problem. I want to create a stored procedure, that creates a table and does various things with it. Before creating a stored procedure I check if the table is there. If it is, I first drop it, and then recreate it.
However when I try to create such stored procedure DB2 complains if the table already exists. The stupid thing does not realise that I do the check in the code. Is there anyway to ignore such errors from DB2 and proceed with creation of the stored procedure? I could put creation of table into dynamic SQL, however, for various reasons I do not want to do that. I am still hopefull there is a way of turning down the stupid DB2 check that prevents me from creating a stored proc.
Jul 15 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.