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-07-31 : 11:13:30
|
Hi friendsi have a sql query with a where conditionlike this where (customername=@customername or @customername is null)For the @customername parameter , i want to provide multiple values so i change the codetowhere( customername in (@customername) or @customername is null)...but when i am trying to pass in the parameter values the following error is popping up'An expression of non-Boolean type specified in a context where condition is expected near ',''Can someone guide me on how to do this... |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2012-07-31 : 12:01:58
|
Thank you visakh 16..was great help to me.. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-31 : 13:07:08
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2012-07-31 : 17:01:11
|
Hi Visakh sorry but the error has come back again...its due to the second part of the where condition @customername is nullwhen i remove it it works just fine... I just cannot understand |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-31 : 17:15:33
|
unless you give us full picture i dont we will be able to help you muchjust adding @customername is null wont cause any errorso post us full query end explain what exactly you're trying to od------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|