Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ISNULL has DECODE or IIf

Status
Not open for further replies.

lupien1

Programmer
Mar 1, 2005
34
CA
I'm looking for a SQL function for SQLServer that work has Oracle function DECODE(TOTO, NULL, "OK") or Access function IIf(TOTO Is Null,Null,' /' & TOTO).
 
A similar question was asked yesterday. Take a look at it thread183-1121907

If this does not answer your question, let us know.



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
the CASE expression would do what you're after, but if you're just checking against NULL you can use a combination of the ISNULL function with the NULLIF function. see BOL for details.


I'm the Chairman of the Bored
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top