Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to combine two cursors?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01411721
Message ID:
01411727
Vues:
54
>>>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
>
>BTW, by CURSOR in SQL Server do you mean DECLARE CURSOR command ?

I meant the cursor you use in SELECT * INTO. And when getting data from SQL Server using SPT.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform