On Wed, 21 Oct 2009 16:48:21 +0000 (GMT) Sydney Puente said:

<snip>

> However sync's  from  MS SQL to MYSQL are required every 24 hours after the 
> initial dataload.
> And this has me puzzled.
> Advice anyone?
> Please ;-)

If there's a auto-inc key, you can find the last one from the
MySQL_table then SELECT ... from MSSQL_table where key > found_key.

Otherwise, add a field to the tables:
seen ENUM('NEW', 'GET', 'GOT') default 'NEW';

At update time:
UPDATE MSSQL_table SET seen='GET' WHERE seen='NEW';
SELECT ... FROM MSSQL_table WHERE seen='GET';
INSERT INTO MySQL_table ...
UPDATE MSSQL_table SET seen='GOT' WHERE seen='GET'; 

lather, rinse, repeat.


-- 
Don Read                                        don_r...@att.net
     It's always darkest before the dawn. So if you are going to
     steal the neighbor's newspaper, that's the time to do it.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to