DataCompare with a WHERE to only get FK rows of lower tables

I have a database w/ about 20 tables.

There is one table that is basically at the top of the Pyramid.

I want to do a SQL DataCompare where I only get FK rows in child tables..

Lets Assume A is Top Table and B is Child Table.

I have 10 rows in Table A and 100 in Table B.

Right now when I do a Where a.rowid = 1, my script still returns all rows in Table B. I only want to get the 10 rows in TableB with a FKID of 1.

I have tried unchecking "Disable Foreign Keys" in the Options Tab, but that didn't seem to help

Comments

  • Thanks for your post.

    It sounds like you need to put the where clause on table b. e.g.

    b.FKID = 1
    Chris
  • Yes, I could do that.. but with 20 tables.. keeping track of 20 Guids is exactly what I was trying to avoid.. If I have to keep track of all 20 Guids.. then I might as well just go through each table and restrict them by hand instead of using a where clause... but i was hoping to avoid that, as I tend to make errors when I copy and paste all those GUIDs around. :)

    casey
Sign In or Register to comment.