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:
01411796
Vues:
49
>>>This solution Re: How to combine two cursors? Thread #1411721 Message #1411759 ?
>>>
>>>Or did you mean just insert all records from the smaller cursor?
>>
>>I am really sorry for your loss that you won't get the solution stars here <g>. I didn't find using UNION to be part of the solution. But your input was valuable. So I thank you.
>
>I was just curious what the actual solution was. But yes, I would not mind getting stars here (one if not 3 would be OK) :)

The solution was as following:
if reccount("MyCursor1") > reccount("MyCursor2")
    select MyCursor1.* from MyCursor1 LEFT JOIN MyCursor2 on MyCursor1.ID = MyCursor2.ID INTO MyCursor3
else
   select MyCursor2.* from MyCursor2 LEFT JOIN MyCursor1 on MyCursor1.ID = MyCursor2.ID INTO MyCursor3
endif
"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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform