Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select - sql trouble
Message
From
18/11/1999 18:01:45
 
 
To
18/11/1999 16:48:21
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00292685
Message ID:
00292775
Views:
26
That's too much work.
Just create a cursor to hold the contents of the array then do a subselect on the cursor.
For example:
CREATE CURSOR curs1 (charfield c(20))
APPEND FROM ARRAY aArray
select x1, x2 from dbx!tablex where x1 in (SELECT charfield FROM curs1)

>cVar = ""
>for i = 1 to alen(aArray)
> cVar = iif(empty(cVar), '("'+aArray(i)+'"',cVar+',"'+aArray(i)+'"')
>next i
>cVar = cVar + ')'
>select x1, x2 from dbx!tablex ;
> where tablex.x1 in (cVar)
>
>This doesn't work too. I will use UDF.
>
>Thank you very much for your help.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform