Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Data Sync Not Deleting Row In Target When A Where Clause Added

forums forums SQLyog Sync tools, Migration, Scheduled Backup and Notifications Data Sync Not Deleting Row In Target When A Where Clause Added

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #12869
      nigelf
      Member

      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.

    • #34007
      ashwin
      Member

      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

    • #34008
      gonzaloleon
      Member
      '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!

    • #34009
      nigelf
      Member

      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.

    • #34010
      Jan.S
      Member

      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

Viewing 4 reply threads
  • You must be logged in to reply to this topic.