what to use instead of "if"? (1 Viewer)

PaulSpell

Registered User.
Local time
Today, 13:18
Joined
Apr 19, 2002
Messages
201
I'm trying to write a pass-through query that contains anumber of IIf statements. SQL Server doesn't appear to like them.

Can anyone please tell me what the syntax should be or what function to use in their place?


Thanks.
 

pdx_man

Just trying to help
Local time
Today, 05:18
Joined
Jan 23, 2001
Messages
1,347
Case When ....
When ...
When ...
Else ...
End
 

PaulSpell

Registered User.
Local time
Today, 13:18
Joined
Apr 19, 2002
Messages
201
Thanks!

Do you happen to know whether there is an equivalent of the nz() function as well?
 

FoFa

Registered User.
Local time
Today, 07:18
Joined
Jan 29, 2003
Messages
3,672
ISNULL(Column,ValueToReturn if null) as ColumnAlias
 

Users who are viewing this thread

Top Bottom