Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Left characters from a list
Message
From
02/10/2003 07:33:46
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
02/10/2003 07:27:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00834168
Message ID:
00834171
Views:
20
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform