Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to combine two cursors?
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01411721
Message ID:
01411722
Views:
68
>Hi,
>
>I have two cursors of the same structure. Some records of one cursor are in the other cursor. How do you make one cursor out of these two that has only unique records?
>
>Also, if I could ask another question in the same thread, what is the max length of characters can be used when naming a cursor (in SQL Select)?
>
>Thank you in advance for any help.

Use UNION to get them combined. UNION eliminates the duplicates.

I'm not sure what is the maximum length, but I would not try more than 30 chars for a cursor name.
select * from myFirstCursor
UNION
select * from mySecondCursor
into cursor curCombinedResults
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform