Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Left characters from a list
Message
De
02/10/2003 07:33:46
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
02/10/2003 07:27:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00834168
Message ID:
00834171
Vues:
21
>Help please
>Why do I get error message 'Command contains unrecognized phrase/keyword' (Error 36) for the folowing code:
>
select * from mycursor where left (myfield,3)  inlist('XXX','YYY','ZZZ')
>Thanks in advance

inlist(A, B, C) means, the first element is equal to one of the others, that is, "A = B or A = C".

In your case, pressumably you mean:
... where inlist(left(MyField,3), 'XXX', 'YYY', 'ZZZ')
In SQL commands, this can also be expressed as:
...where left(MyField, 3) in 'XXX', 'YYY', 'ZZZ')
The inlist() version can be used with other VFP command, too.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform