General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only