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)
 What is a SQL function like Oralce's Decode

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-23 : 10:56:39
Doshi writes "Hi,

Actually, I want to create a dynamic where condition in my sql. i.e. If user passes a value like 'ALL', I want to show all the values of the field else I want to filter its value.

If VarPrdID = 'ALL' Then
PrdID = PrdID
Else
PrdID = VarPrdID
End

How can I use it in my SQL WHERE Condition ?

Any help will be a greate help,

Thanks & regards,

Doshi"
   

- Advertisement -