Groups | Blog | Home
all groups > sql server programming > december 2006 >

sql server programming : IIF functionality


vanitha
12/4/2006 9:21:01 PM
i want to achive the IIF functionality.

example

select
iff(employee.empid is not null,'sdfsdf',iif(employee.deptid is not
null,'dssdf','sdfsd')) as 'sdsd'
from employee

how to solve this.

thank you
vanitha
Arnie Rowland
12/4/2006 11:36:37 PM
You 'might' also find the coalesce() function useful. Check in Books Online.



--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


[quoted text, click to view]

Tibor Karaszi
12/5/2006 8:29:39 AM
Use the more powerful and ANSI SQL compliant CASE construct.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/


[quoted text, click to view]

AddThis Social Bookmark Button