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 |
|
vogabonz
Starting Member
1 Post |
Posted - 2011-07-12 : 07:31:11
|
| Is it possible to change a query based on the existence of a URL variable. I would like to have something like the following SELECT *FROM someTableWHERE someColumn = (if some URL passed variable exists match to it)otherwise just select allVogabonz |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-07-12 : 07:40:15
|
select * from Table where (Column = @URL or @URL is NULL) No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|