Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Synchronize tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00756950
Message ID:
00759911
Vues:
17
>>Hi all, anybody knows of any utility that allow me to synchronize two tables with the same structure? I mean, I got two tables, both with the same structure but I want to synchronize their content making sure all the records within one table are in the other and vice versa.
>>
>>TIA,
>>
>Hi Enmanuel,
>
>You can do that with a couple of selects.
>
* Add records to table2 from table1
>SELECT * FROM TABLE1 ;
>  WHERE keyfield IS NOT IN ( SELECT keyfield FROM TABLE2) ;
>  INTO CURSOR crsNewt2
>SELECT table2
>APPEND FROM ( DBF("crsNewt2") )
>* Add records to table1 from in table2
>SELECT * FROM TABLE2 ;
>  WHERE keyfield IS NOT IN ( SELECT keyfield FROM TABLE1) ;
>  INTO CURSOR crsNewt1
>SELECT table1
>APPEND FROM ( DBF("crsNewt1") )
>
Thanks Sergey, you did it again <g>
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform