Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update records in a table
Message
From
06/08/2002 18:57:42
 
 
To
06/08/2002 17:23:59
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00686781
Message ID:
00686812
Views:
41
Rob,
how about:
SELECT * FROM table_to_source WHERE recchanged =.F. into TABLE table_target

70,000 records you wont even notice the copy

>Hi,
>
>I have two databases, they are basically the same dbase1 is the
>original one, and dbase2 in the new one. What I'm trying to do
>is replace the contents of a table in dbase1 with the contents of a
>table in dbase2. Dbase2 has the latest data in it.
>
>To expand on this. Both of the tables are called "advisory", the
>client may have made some changes to a couple of records in this table
>within dbase1. So when I update the contents I only wish to change
>records which the client has not changed. Any record that has changed
>has a flag set to .T.
>
>So what I have done is:
> CLOSE DATABASES
> CLEAR
> OPEN DATABASE "c:\sas update\gen001\sas.dbc"
> USE advisory EXCL
> DELETE FROM advisory WHERE recchanged =.F.
> PACK
>
>
>This then leaves only the records which have changed. I now want to
>add all other records from the new table in dbase2. I am not sure if
>the best way is to use an APPEND FROM or a REPLACE, or is there a
>better way.
>
>The Key to both tables is the mangercode.
>
>The table will have approximatly 70,000 records so I can't use an ARRAY.
>
>
>Any advice / help would be much appreciated.
>
>Cheers
>Rob
Previous
Reply
Map
View

Click here to load this message in the networking platform