Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting FROM/INTO same cursor
Message
From
05/08/2008 13:13:52
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01336417
Message ID:
01336607
Views:
16
>I'm not sure why you''re using a subquery. Your query is equivalent to
>
>SELECT * FROM (lcReturn) ;
>                   WHERE activity = "Passed - waiting for source" ;
>                    AND EMPTY(date_end) ;
>  INTO CURSOR (lcReturn)
>
>
I don't think so. I'll expand on my reply to Naomi by showing some data.
RMA    Activity  
1      Received  
1      Processed 
1      Returned
2      Received  
2      Processed 
2      Returned
3      Received  
3      Processed 
3      Passed - Waiting for Source
I need to get all three records for RMA 3. I believe my query does that, while yours would only get the last record.

Am I missing something??????




>>
>>lcReturn = thisform.odata.Get_RMA_Status_By_Customer(ldteStart, lDteEnd, lcCustomer, lcStatus)
>>
>>SELECT * FROM (lcReturn) ;
>> WHERE rma_no IN (SELECT rma_no FROM (lcReturn);
>>                   WHERE activity = "Passed - waiting for source" ;
>>                    AND EMPTY(date_end)) ;
>>  INTO CURSOR (lcReturn)
>>
>>etc
>>
>>It seems to be the combination of the same cursor for the FROM, IN, and INTO portions of the query. Several variants worked quite well.
>>
>>I also tried putting the actual cursor name, rather than the variable reference, into the query and got the same error.
>>
>>FWIW, I get the same error using VFP 9
>>
>>I have alternatives which are working so this is not a big issue for me. I was, and still am, curious as to what might be happening within VFP to cause this problem.
>>
>>Thanks for any insight
>>
>>.........Rich
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform