Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy record from one table to another
Message
De
26/06/2002 10:49:16
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00672054
Message ID:
00672472
Vues:
7
Steve,
Are you using FoxPro tables or are you connecting to something like SQL Server?
If you are using FoxPro tables:
I agree with the SCATTER/GATHER method, but your field names are not the same.

If you are using non-FoxPro tables AND there is a unique key:
I believe that you must use the Insert statement.

--------------------------------------------------------------------
select vehicle_arc
SELECT * from lv_veh WHERE lv_veh.v_id = .a INTO TABLE tt_vehicle_arc
select tt_vehicle_arc
scan
insert into vehicle_arc fields(f1,f2,f3);
values(tt_vehicle.f1,tt_vehicle.f2,tt_vehicle.f3)
endscan
* this method may be slower because you are touching each record yourself.
--------------------------------------------------------------------

Another method would be to copy the data to a .csv and append the data.
select vehicle_arc
copy to tt_vehicle_arc type csv for "where clause"
select lv_veh
append from tt_vehicle_arc

Good luck,
Mike
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform