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 |
|
alanmac
Starting Member
26 Posts |
Posted - 2011-01-17 : 03:45:04
|
| Hi,I have a query which lets the user pass in up to 12 parameters from a search page and I return the matching results. My WHERE clause generally looks like this:AND ((@ParkingPermitIssued is null) or (vc.ParkingPermitIssued = @ParkingPermitIssued))AND ((@TownID is null) or (a.TownID = @TownID))However, I have a column (DateOfForumMembership) which is type DATETIME and can be null. The user can pass in a parameter (@ForumMember) which can be null (don't search on this criteria), true or false. How would I adapt my WHERE clause to accommodate this? |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
|
|
alanmac
Starting Member
26 Posts |
Posted - 2011-01-17 : 06:09:29
|
| Thanks GilaMonster,I have adapted my SP to use the format suggested in that post. |
 |
|
|
|
|
|