I am creating a advanced search page.in that I have 11 fields.i wrote a stored procedure which having all 11 parameters.
If I don’t enter any one of the value I am not getting the result and it will goes on exception handling.
Now what I want is even I enter one value this must be excute………….i think some validations should be done in
Stored procedure's 'where' clause.but I don’t know how
i would be very happy if someone guides me with sample code for this.
I presume you mean your front end catches an exception. Correct me if wrong.
You must either pass a value for all parameters (even a NULL will do) or put in default values for parameters you will not pass. This is no different to any other programming language if you think about it. Check out CREATE PROCEDURE in books online.
Get your head round that then we can move on to the next bit.