Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using IIF() function in SQL command
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00212178
Message ID:
00212207
Vues:
24
>It seems if you use an IIF() statement in a SQL command, it is evaluated only once instead of for each record. For example:
>
>SELECT IIF(column1=.T.,column2,column3) etc...
>
>This will pull all column2 or column3 in the resulting cursor but not combination of each depending upon the value of column1 in each record. Is there a way to do this to pull from both column2 and column3 depending upon value of column1? I must be missing something abvious.
>
>TIA

John,

Ed gave you answer, I do, however, want to mention that you can improve the performance of the query (and simplify it as well) by using SELECT IIF(column1, column2, column3).
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform