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)
 Dynamic Where Help

Author  Topic 

Gsuttie
Starting Member

14 Posts

Posted - 2001-03-02 : 09:18:12
I have a search function which has 7 rows (as below)

@ExtRef int,
@IntRef int,
@ZipCode varchar(50),
@TradeDate datetime,
@CptyName varchar(50),
@BookName varchar(50),
@Trader varchar(20)

I need a stored proc which will build a dynamic where clause but im getting mixed up with coalesce and what not.
If 2 fileds are filled in (say TradeDate and Cpty Name) I need results just for those 2.

Please help
Regards
Gregor

Greg
   

- Advertisement -