Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy records from one dbf to another dbf
Message
 
 
To
18/07/2004 23:33:54
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00925641
Message ID:
00925642
Views:
16
You can use a query to get records you want into a cursor first and than add them to the Group table.
SELECT * FROM master ;
  WHERE code NOT IN ( SELECT code from Group) ;
  INTO CURSOR crsTemp
SELECT Group 
APPEND FROM ( DBF("crsTemp") )
USE IN crsTemp
In VFP8 you can do that in one step using INSERT INTO SELECT FROM command.

>
>I have two tables the first is "Master" and the other is "Group".
>The both tables has common fields as
>
>code n(6)
>name c(40)
>
>For Group table, I want to copy, from Master table, only those codes that are not exists in Group table.
>
>Index is on code field.
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform