Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exchanging records from two tables
Message
 
 
To
02/07/2006 05:52:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01133308
Message ID:
01133329
Views:
13
>How to exchange records between two tables which have exactly the same structure with exactly the same number of records in a snap?

Something like
USE table1 IN 0 EXCLUSIVE 
USE table2 IN 0 EXCLUSIVE 
SELECT * FROM table1 INTO CURSOR crsTemp
SELECT table1
ZAP
INSERT INTO table1 SELECT * FROM table2
SELECT table2
ZAP
INSERT INTO table1 SELECT * FROM crsTemp
USE IN table1
USE IN table2
USE IN crsTemp
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform