Howto Implement Partial Sync

CoastalDataCoastalData Posts: 22
Hello, I have a sub-set of 9 tables that I want to partially sync from our internal LAN database to our website database.

The data that should be published is only records related to one particular record which is marked as "PublishToInternet". I tried adding a WHERE clause to that table, but then that left relational records with no parent record, and so they failed to publish, and that caused the entire sync to fail.

How should I handle this? Can I add a complex WHERE clause to the relational tables that include left and/or right joins, etc., to correct this?

Also, if I were to attempt to automate this in the future, using wither SQL Prompt, or Comparison SDK, are there either pros or cons that would affect that process?

Thanks in advance, any help or advice is greatly appreciated!

--Jon

Comments

  • Thanks for your post.

    You can add a more complex where clause to make sure the sync takes into account the other referenced tables. For example, using a nested select, e.g.

    id in (select id from othertable)

    As long as the where clause is valid and can be parsed by SQL Server, you can use it as a filter in SQL Data Compare.

    This will be the same with the SDK.

    SQL Prompt is a code completion tool, so I'm not sure how that would help with automation in the future.

    I hope this is helpful.
    Chris
  • id in (select id from othertable)
    

    How do I express this when "othertable" comes from another database on another server?
Sign In or Register to comment.