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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Avoiding dynamic queries - Conditional parameters

Author  Topic 

jgandara
Starting Member

18 Posts

Posted - 2006-03-09 : 13:47:11
I have a store procedure with 4 parameters; all of them are optional, the can be empty string or a real value.

What is the best way to return the SELECT statement by using conditional parameters.

Right now I use a dynamic query

jgandara
Starting Member

18 Posts

Posted - 2006-03-09 : 13:53:01
I found it in this article.

http://www.sqlteam.com/item.asp?ItemID=2077
Go to Top of Page

mmarovic
Aged Yak Warrior

518 Posts

Posted - 2006-03-15 : 17:29:20
Dynamic sql or a few if then branches calling branch specific stored procedure.
Go to Top of Page
   

- Advertisement -