Suggestion: Default values in the synchronization script
paulo_morgado
Posts: 97 Silver 2
I have this set of databases that I must keep in "sync".
Each table has a DateTime column with the time of the last modification. These columns are excluded from the comparison but must be set in the synchronization. It would be nice to be able to set a default "value" (fixed or a function call) for the synchronization script.
Each table has a DateTime column with the time of the last modification. These columns are excluded from the comparison but must be set in the synchronization. It would be nice to be able to set a default "value" (fixed or a function call) for the synchronization script.
Comments
You could do something similar by adding a trigger to your table so that when a row was inserted it could add the appropriate value to the table at that point.
Project Manager
Red Gate Software Ltd
I have thought of the trigger. In the present example it would be easy to have a trigger to set the the DateTime value to getutcdate(). But, what if I have another DateTime column "EfectiveFrom" that is a static value just form that synchronization operation?
Portugal
Web Site
Weblog
Twitter
Thinking more you could use indexed views on your data that replaced the column with a fixed value on one side and an insert trigger to go past the view on the other side, although now it's just getting nasty
Project Manager
Red Gate Software Ltd