Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting FROM/INTO same cursor
Message
From
05/08/2008 15:17:38
 
 
To
05/08/2008 13:46:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01336417
Message ID:
01336652
Views:
10
>I updated my answer before your reply. Anyway, try this two liner
>Select * From (lcFile) Into Cursor curDummy Readwrite Where activity="Passed - waiting for source"
>Select * From (lcFile) Inner Join curDummy On &lcFile..rma=curDummy.rma Into Cursor (lcFile) Readwrite
>

It wasn't that I didn't have a working solution. I was curious as to what was causing the cursor to close in what I thought of as a relatively normal command. Normal in the sense that I didn't see anything that violated SQL syntax.

Your two-liner is one of the several alternates I found, and the one I eventually selected (although my version use an alias rather than a macro expansion)





>>You're missing the point that we don't know RMA. That was just a sample. We need to get all the records that have the same rma as the one with "Passing date"
>>
>>Since Rich is using VFP8 the only way would be to do in two steps. In VFP9 syntax with derived tables work fine, but IN and EXISTS don't work.
>>
>>>You've got it all wrong, your query will give the same result as Sergey's. This query will give the data you want:
>>>SELECT * FROM (lcReturn) ;
>>>  WHERE RMA=3  AND EMPTY(date_end) ;
>>>  INTO CURSOR (lcReturn)
>>>Or am I missing something?
>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform