Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Handle No Params Passed
Message
From
05/11/2008 21:21:52
John Baird
Coatesville, Pennsylvania, United States
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 6.5 and older
Miscellaneous
Thread ID:
01359989
Message ID:
01360060
Views:
15
>>>
>>>
>>>It's possible for any combination of parameters to be passed. How do I change the WHERE clause to handle this?
>>>
>>>Thanks
>>
>>Loop through the parms collection and build the where clause dynamically...
>
>I don't think running dynamic SQL is a good idea. If there are few parameters, using NULIF or ISNULL functions I would expect to be quicker.


If you read the question carefully, you'll see the following statement: It's possible for any combination of parameters to be passed. How do I change the WHERE clause to handle this?

Notice the "its possible for ANY COMBINATION OF PARAMETERS". How do you account for getting 1 or 5 or 15?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform