Information générale
Catégorie:
Codage, syntaxe et commandes
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
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