Filter rows for a table to compare
Shloma Baum
Posts: 4
Is there any way to filter a table when comparing (using the toolkit), for instance I would like to filter that it should only compare on rows that for of its fields has a specific value
This discussion has been closed.
Comments
We had just posted an article about this elsewhere on the bulletin board:
http://www.red-gate.com/messageboard/vi ... .php?t=556
Please let me know if you have any questions on this!
Thanks for the reply, however that article dosnt' really solve my problem.
what I would like to do is, for example I have a table called contacts in 2 databases that I want to compare, I want database 2 should be equal to database 1, but in database 1 in the table Contact I have a field called IsActive and I want to compare only on records that has IsActive=1.
Actually its something similer to compare a View with a table.
I hope you got my point.
Best Regards,
Shloma
Sorry for the misunderstanding. You want to only synchronize records with a certain value in a column rather than simply omitting columns. You can do this in Data Compare Engine, but it's a bit complicated because it involves setting up a SelectionDelegate object. I will email you the example code to do this because it's much, much easier to look at the example than for me to try to explain it.
Actually I could use some clarification from you: The Data Compare library needs to compare all records; the records that appear in the synchronization script are what you can pick and choose.
So the question is: do you want to synchronize the records that have IsActive set in both databases, or if the flag is set in one database or the other?
I want to compare the records where IsActive is True for both databases.
Thank you very much for your help.
Shloma