Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replacing contents of 1 database with that of another
Message
De
30/07/2002 18:56:27
 
 
À
30/07/2002 18:02:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00684236
Message ID:
00684258
Vues:
19
You can try something like this.

OPEN DATABASE database1
USE country IN 0 ALIAS ReplaceMe EXCL

OPEN databse database2
USE country IN 0 ALIAS Country
SELECT Country
COPY TO ARRAY aTemp

SELECT ReplaceMe
ZAP
APPEND FROM ARRAY aTemp

don't forget to backup first


>Hi,
>
>Sorry about asking such a silly question - but I'm new to Vfoxpro!
>
>I have two databases, they are basically the same. What I'm trying to do is replace the contents of a table in dbase1 with the contents of a table in dbase2.
>
>To expand on this. Both of the tables are called "country", what I want to do is overwrite the entire contents of the table "country" in dadabase1 with the entire contents of "country" in database2.
>
>What I thought I needed to do was remove the table in the first database and then try to copy the otherone over.
>
>Is this the easiest / best way to proceed? The table structure is the same in both databases
>
>Cheers
>Rob
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform