Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The fastest way to move data from one table to another?
Message
 
À
05/01/2009 02:43:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01370929
Message ID:
01370949
Vues:
49
This snippet may help or provide ideas...

m.lcSFile = Alltrim(This.Parent.Text1.Value)
m.lcTFile = Alltrim(This.Parent.Text2.Value)
m.lnOkay = Messagebox("You want to copy from: Source file: " + lcSFile + Chr(13) + ;
" into Target File: " + lcTFile, (4-32-256))
If lnOkay = 6
Use &lcSFile In 0 Alias Source
Use &lcTFile In 0 Alias Target
Select Source
Scan For !Deleted()
Scatter Name oSourceData
Select Target
APPEND blank
Gather Name oSourceData
Select Source
Endscan
ENDIF

This seems to be very fast, very simple (as long as the two tables are identical). If not the ields that don't match will simply be ignored.

GSD
Driving toward a Tactical Edge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform