forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › Data Sync Not Deleting Row In Target When A Where Clause Added
Tagged: data sync delete
- This topic is empty.
-
AuthorPosts
-
-
November 29, 2012 at 2:11 pm #12869nigelfMember
I have a job that syncs 2 tables, with a WHERE clause :
“ex_id < 1000" where “ex_id” is a column that is part of a 2-col composite key. If I sync with no WHERE, any rows deleted in the source are also deleted in the target (as expected). With the WHERE clause, if I delete a row in the source (with ex_id < 1000 !), it is not deleted in the target. it does, however, insert any missing rows. SQLyog Ultimate 9.51 MySQL 5.5.27 Any ideas why? thanks.
-
November 30, 2012 at 5:11 am #34007ashwinMember
Hi,
Please confirm whether you are doing One-way sync or Two-way sync? Because Insert from Target to source happens only in Two-way sync.
Regards,
Ashwin
-
December 4, 2012 at 9:48 pm #34008gonzaloleonMember'ashwin' wrote:
Hi,
Please confirm whether you are doing One-way sync or Two-way sync? Because Insert from Target to source happens only in Two-way sync.
Regards,
Ashwin
I'm having the same problem, i make another post.
In my case, im doign one way sync.
Thanks!
-
December 5, 2012 at 12:58 pm #34009nigelfMember
Hi,
One way sync – but I'm not looking to insert into the source table. Normally in one-way sync, if a row has been deleted in the source, it is then deleted in the target when synced. But when I add the WHERE clause, the deleted rows in the source are no longer deleted in the target.
thanks.
-
December 6, 2012 at 9:00 am #34010Jan.SMember
Hi,
This is by design. When you have a WHERE clause, and rows need to be deleted in the target, there is a discrepancy in which rows should be deleted. Therefore, to avoid any confusion, rows are not deleted when a WHERE clause is used.
Regards,
Janani
-
-
AuthorPosts
- You must be logged in to reply to this topic.