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)
 IIF function

Author  Topic 

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 2007-04-25 : 12:35:16
Does SQL have similar function like IIF?

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-25 : 12:47:47
Yes. It is called CASE statement.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

PurpleSun
Yak Posting Veteran

50 Posts

Posted - 2007-04-25 : 12:49:04
Yes it does, if you work with MDX.
Go to Top of Page

mattyblah
Starting Member

49 Posts

Posted - 2007-04-26 : 00:27:11
case function as harsh said:

select case when 1 = 1 then '1=1' else '1<>1' end
Go to Top of Page
   

- Advertisement -