Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need a shorcut for this one too...
Message
De
10/01/2000 23:27:58
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00315967
Message ID:
00315970
Vues:
26
Steve,

If you want them all to be "Y", check for an "N".

IF !INLIST("N", Field1, Field2, ...) && Same as Y and Y and Y and...


>I am looking for a shortcut way to do this.
>Thanks in advance and then some.
>
>IF mytable.my_field1 = "Y" AND ;
> mytable.my_field2 = "Y" AND ;
> mytable.my_field3 = "Y" AND ;
> mytable.my_field4 = "Y" AND ;
> mytable.my_field5 = "Y" AND ;
> ...(do whatever)
>ENDIF
>
>I learned from John Koziol that I can use INLIST() function for
>IF
>..."Y" OR ;
>..."Y" OR ;
>..."Y" OR ;
>...(do whatever)
>ENDIF
>
>But INLIST() doesn't look like it would work for AND conditions;
>Is there something like INLIST() but for AND conditions that checks for all matches .T. (true) when comparing an expression contained in every expression, not just one expression as in OR conditions?
>
>I could use one. Thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform