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

How to handle NULL parameters,EMPTY parameters and ERROR HANDLING in stored procedure

P: 66

I have stored procedure in which i am passing parameters (varchar(8000)),
these parameters can have values or can be empty (''), i have written blocks of codes for each parameter , which executes only if parameter has values, it should not enter the block if parameter is empty,
how to detect whether the parameter is empty or not.

and also i am having output parameter (varchar(1)) that is returned by stored procedure, if all of the parameters has values then output parameter returns some value, if any of the parameters is empty, then it doesn't go till the line where OUPUT parameter is set to some value, thats y no value is returned.
can anyone help me to sort out this problem.


Feb 17 '09 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 2,878
You can actually give default values to those parameters during creation/definition.

Read it here

-- CK
Feb 17 '09 #2

Post your reply

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