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 |
|
ultraman
Starting Member
18 Posts |
Posted - 2004-11-01 : 14:11:12
|
Hi !I want to create a SP that receives 8 parameters. Those parameters can be empty (0 or '' value) and are to be used in the WHERE clause. My question is : how can I customize the WHERE clause according to the parameters that actually have a value other than 0 or '' ?Example :SELECT * FROM TABLE WHERE if(@Param1 > 0) FIELD1 = @Param1 --------------Ultraman |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
ehorn
Master Smack Fu Yak Hacker
1632 Posts |
|
|
ultraman
Starting Member
18 Posts |
Posted - 2004-11-02 : 11:15:55
|
| Thanks a lot guys, your infos were very helpful, especially yours ehorn, since it was a case closer to mine.--------------Ultraman |
 |
|
|
|
|
|