Sep 19, 2002 #1 ChrisN Programmer Jul 9, 2001 59 GB Is there an equivalent to the MS Access IIF function in SQL?? TIA Chris
Sep 19, 2002 #2 rt63 IS-IT--Management Aug 20, 2001 255 IN Not in SQL 7.0 - maybe in SQL2K (though I doubt) - probably can create a UDF in SQL2K. You can also use CASE instead select case when <some condition> then <some value> else <some other value> end RT Upvote 0 Downvote
Not in SQL 7.0 - maybe in SQL2K (though I doubt) - probably can create a UDF in SQL2K. You can also use CASE instead select case when <some condition> then <some value> else <some other value> end RT
Sep 19, 2002 #3 paron Instructor Apr 24, 2001 179 US I alse used IIF for handling nulls, which in SQL Server comes out like: ISNULL(MiddleName, N'(NMN)') In this example NMN is shown if MiddleName is null. Ron Upvote 0 Downvote
I alse used IIF for handling nulls, which in SQL Server comes out like: ISNULL(MiddleName, N'(NMN)') In this example NMN is shown if MiddleName is null. Ron