Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The fastest way to move data from one table to another?
Message
 
To
05/01/2009 02:43:25
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01370929
Message ID:
01370949
Views:
47
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform