Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a SQL-Server version of IIF()
Message
From
15/07/1998 12:00:42
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00117628
Message ID:
00117641
Views:
12
Warning! I'm a SQL neophyte, but I was interested in your question, so I tried the following

SELECT Facility.fty_num, "Yes" as f1 ;
FROM apmm!facility ;
WHERE Facility.fty_num <> " " ;
UNION ;
SELECT Facility.fty_num, "No " as f1 ;
FROM apmm!facility;
WHERE Facility.fty_num = " "

just as a test. It's close, but it's just selecting distinct entries. But, maybe it will help a bit.

>Does anyone know if there is a SQL Server function which is like IIF() in VFP?
I want to do a select statment like the following...
>
>SQLEXEC(1,"select iif(lCondition,'Yes','No') from Table")
>
>Thanks,
Previous
Reply
Map
View

Click here to load this message in the networking platform