Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL SELECT and Arrays
Message
From
06/04/2018 20:25:37
 
 
To
06/04/2018 17:05:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01659198
Message ID:
01659206
Views:
55
>Hello.
>I have an array full of primary-key values for a table.
>
>Is there a way in VFP that I can query against this array to extract values from a table?
>
>Something like
>SELECT * FROM mytable where mytable.PK in myarray
>
>Thank you.

Well, there is a way, but it's not optimizable:
SELECT * FROM mytable WHERE ASCAN(myarray,PK,1,-1,-1,2+4) > 0
Another way is copying the array to a cursor and using a normal Query.
Fernando D. Bozzo
Madrid / Spain
Previous
Reply
Map
View

Click here to load this message in the networking platform