compare and then update table row values

danielguerradanielguerra Posts: 2
I have gotten Data Compare to open up my two databases and show me the differences between two databases but I want to do some more complex things with my data once I find differences and I'm not sure if this tool can do it.

1 db in dev
1 db in prod

I want to be able to:

1)Compare all processes, templates, roles, and products for date/time differences between the Development and Production databases
2)If there is a difference, update the version number of the process
3)Change the last edited by to pdsysadmin
4)If there is no difference, then it does nothing to the process/product/templates/roles page


I want to compare the development and prod database and find anywhere where the last edited dates don't match (the system will update the last edited date but not the version).

For the differences that Data Compare finds I want to have the Production db version number field and the date/time field updated to match the Development database values. If the last modified dates on both db's match it means that nothing was touched and that row does not need to be modified.

Has anyone used Data Compare to do anything like this?




  • Options
    Thanks for your post.

    It sounds like you should be able to do what you need.

    1. Go to the 'Tables & Views' tab, and only select: processes, templates, roles, and products
    2. For each of the tables/views you're comparing, set a WHERE clause to match on any rows where the update dates don't match.
    3. When you sync' make sure you use the pdsysadmin account, so that is the account used to update the target. that is assuming the last edited field is populated by the user account.

    If this doesn't help, you could probably get most of the way there using this method, and then just output the deployment script and edit it to fit your requirements.

    I hope this helps.
Sign In or Register to comment.