Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combining two cursors
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00019482
Message ID:
00019579
Views:
48
>>>>>>>>>I want to combine the contents of two cursors into another cursor.
>>>>>>>>>Is this possible? Both cursor have the same number of fields and
>>>>>>>>>the same field names.
>>>>>What is it you're trying to do Jeff?
>>>>Let's say cursora has 10 records and cursorb has 15. I want to have a
>>>>cursor that has 25 records.
>>>You want to "append" is the term then...you can use my idea, or there
>>>are several ways to solve this, I'm sure...
>>
>>One of the several ways would be:
>>
>>SELECT * ;
>>    FROM cursorA ;
>>    INTO CURSOR cursorC ;
>>    ORDER BY orderField
>>UNION ;
>>SELECT * ;
>>    FROM cursorB
>>
>
>Hmmm...this looks good, but when I tried it I only got records from cursorA. Is there something missing?

Okay, I see. Anything after the 'order by' is not executed/gives error depending on where you run it. It works when that is deleted...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform