Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I append and copy at the same time?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01499518
Message ID:
01499521
Vues:
41
>>Hi,
>>
>>The title of the thread does not convey what I am trying to do. I just could not put it all in a sentence.
>>
>>Here is what I am trying to do.
>>
>>I have a cursor filled with a Cursor Adapter object that has so many records (practically from 1 to 10).
>>I want to insert new records into the cursor for each existing record and copy all fields except two 2 fields: PK column/field and another field. I was thinking about using SCAN - ENDSCAN but if I keep adding a record on each loop of the SCAN, I will never get out of the SCAN loop.
>>
>>Any other suggestions, please? TIA.
>
>insert into (CA.Alias) (field1, field2, ...) select field1, field2, .. from (CA.Alias)
You just beat me to the solution. I just thought about exactly the same and tried to update my initial message when I realized that someone must be posting reply to mine. I think what you suggest will works. Thank you very much.
"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