Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert records from one table to another
Message
 
 
To
05/10/2007 16:28:16
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01259065
Message ID:
01259084
Views:
16
>I have an as400 file that holds my data. I use FoxPro as front end for my app. Some of the records in the data file were deleted. I have pulled the data file from a backup and found the missing records. How do I get the records from the back up to the production data file.
INSERT * INTO ProductionTable pt 
  SELECT * FROM BackupTable bt 
    WHERE not EXISTS (SELECT * FROM ProductionTable pt2 WHERE pt2.pk = bt.pk)
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform