DataCompare with a WHERE to only get FK rows of lower tables
ccupp@petroweb.com
Posts: 5
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
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
It sounds like you need to put the where clause on table b. e.g.
b.FKID = 1
casey