Cascading WHERE Clause
ramseyjacob
Posts: 3 New member
Hello,
I have seen another post about this, but I can't seem to leave a comment so I'm starting a new Topic.
My database has hierarchical relationships with many levels where each level relates to the one above it...pretty standard stuff.
When using SQL Data Compare, I can set a WHERE clause on the top level table to filter the results based on the primary keys I'm interested in, but I don't see an option to cascade through the hierarchy. Much like CASCADE DELETE will "crawl" the relationships and delete all the related rows, I would like a way to crawl the relationships and only sync the data related to the rows that match my WHERE clause at the top level.
The hierarchy structure is complex, so I don't want to do this by hand. I would also like to do this for many databases, so again I don't want to have to hand roll this each time. Also, in my case it isn't an option to sync everything and then do a DELETE to eliminate the data I'm not interested in. Don't ask why, it just isn't :?
Is this an option in the current version of the tool?
Thanks.
I have seen another post about this, but I can't seem to leave a comment so I'm starting a new Topic.
My database has hierarchical relationships with many levels where each level relates to the one above it...pretty standard stuff.
When using SQL Data Compare, I can set a WHERE clause on the top level table to filter the results based on the primary keys I'm interested in, but I don't see an option to cascade through the hierarchy. Much like CASCADE DELETE will "crawl" the relationships and delete all the related rows, I would like a way to crawl the relationships and only sync the data related to the rows that match my WHERE clause at the top level.
The hierarchy structure is complex, so I don't want to do this by hand. I would also like to do this for many databases, so again I don't want to have to hand roll this each time. Also, in my case it isn't an option to sync everything and then do a DELETE to eliminate the data I'm not interested in. Don't ask why, it just isn't :?
Is this an option in the current version of the tool?
Thanks.
Comments
I can't see that this cascades to dependent tables (documentation) and I have not found any reference to this in our issue tracking system. I would recommend putting this on the SQL Data Compare Uservoice forum for others to vote on so the developers can see the demand for it.
Also, I couldn't find the other forum post you mentioned - can you provide a link to this as well?
Kind regards,
Alex
Have you visited our Help Center?