I have to 3 parameters in picture.. state, city and emp name... i have to create a query to perform

Posted by Sp under ASP.NET on 8/23/2012 | Points: 10 | Views : 737 | Status : [Member] | Replies : 1
I have to 3 parameters in picture.. state, city and emp name...
i have to create a query to perform search on the basis of values provided for eg: if no value is provided for State parameter but value is provided for other two parameters than i.e city and emp name than result from db should be returned on the basis of this combination(null value for state parameter should not be considered....
i.e query should return result for combination of city and emp only and NOT city, employee and null...

Same for other situation where maybe just state value is provided not the other two...




Responses

Posted by: Siva524 on: 8/23/2012 [Member] Starter | Points: 25

Up
0
Down
then make one of both (city and emp) make primary key then based on this primary key condition you can get your required solution.

Sp, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response