On 14-May-07, at 12:26 PM, Chris Griffin wrote:
> I have two REALSQLdatabases. The structure of both is that same. I
> need to update the rows of one from the other where the filed
> modify_date is greater. I know I can do this by looping through the
> one and updating the other but I was hopping I could do a INSERT OR
> REPLACE to do this. Has anybody done this or similar? Thanks for any
> help.
>
Try attaching the other database using the attach command and then
you can use an insert into
You can refer to the tables using a prefix (ie attchedDB.tablename)
so you can do
insert into attacheddb.table1 select * from table1
and table1 is in the db you originally opened
updates would be similar with various where clauses to make sure you
only update the correct set of records
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>