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,
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement