Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF() is SQL not working
Message
De
21/08/1998 11:22:27
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00128646
Message ID:
00128806
Vues:
18
If 'Lexp' is a field from the table you are selecting from, try the following:

Select;
TblName.cField,;
IIF(TblName.Lexp = .T., 'Y', 'N'),;
COUNT(*);
FROM TbLName GROUP BY 1,2

-myron kirby-
=====================================================

>When I run the following
>
>Select cField, iif(Lexp,'Y','N'), COUNT(*) from table group by 1,2
>
>It groups by the iif statement properly, but populates all of the second field with the .f. iif value--'N'. The exception is when the group of field1 only has representatives of the .t. iif value, and then populates the one field with 'Y'.
>
>I frequently use IIF in SQL and occassionally run into this problem. Does anyone know why?
>
>Thanks in advance for your assistance.
----------------------------------
-myron kirby (mkirby2000@gmail.com)-
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform