all groups > sql server new users > december 2004 >
You're in the

sql server new users

group:

IIF function wont work


IIF function wont work Nickl
12/5/2004 7:09:01 PM
sql server new users:
I have a problem using the IIF function in an Access Project. I am trying to
use it in a view/function, in the column grid of the designer, but I get the
error "ADO error: iif is not a recognised function name" when I try to save
the View/function.

THe expression I am attempting to use is;
IIF (dbo.tblCaks.[DocType] = "DR","True","False")

DocType is a char field, and other functions are working fine (eg LEFT, RIGHT)
Any suggestions as to how I can make the IIF function work would be
appreciated.

Thanks

RE: IIF function wont work Ed
12/5/2004 8:55:02 PM
try
case when dbo.tblCaks.[DocType] = 'DR' Then 'True' Else 'False End as
AnyNamehere

Ed

[quoted text, click to view]
RE: IIF function wont work Nickl
12/6/2004 2:59:10 AM
THanks Ed, it worked like a charm, once I got over mourning the loss of my
beloved IIF function. I even managed to nest multiples in there.

[quoted text, click to view]
AddThis Social Bookmark Button