Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2012-06-14 : 16:16:05
|
Hi friends,I want to handle a seacrh operation where the parameters are sent from the front ends.In my scenario say there are two parameters, I want to get write a query where in it satisfies the following1) parameter1 and parameter 2 both are null values2)parameter1 and parameter 2 both have some values3)parameter1 has value but param2 is null4)parameter1 is null but param2 has value...How can i achieve thisThank You |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
|
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2012-06-14 : 18:21:45
|
Thanks Lamprey..It worked fine..But i have got another problem..How to check for empty strings...Should i check them in thef ront end or in the backend query..Please suggest..Thanks |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-06-14 : 22:42:42
|
quote: Originally posted by akpaga Thanks Lamprey..It worked fine..But i have got another problem..How to check for empty strings...Should i check them in thef ront end or in the backend query..Please suggest..Thanks
instead of checking @param is nulljust like nullif(@param,'') is null------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|