Is an "inclusive" where clause possible?

aspillertaspillert Posts: 20
I'm comparing 7 columns on EMPLOYEE tables in two databases, DEV and PROD. My "where" clause includes active only. To verify the Data Compare 7 result I'm doing simple SQL queries.

I see 7 employees on DEV who are not in PROD using DC7. When I look them up in SSMS these folks are in both, but inactive on one.

I would like them to appear in the "exist in both" list. Is there a clean way to do this?
AlanCHB

Comments

  • Thanks for your post.

    The where clause is used to filter the comparison, so if you use a where clause to only include rows that are 'active', then the 'non-active' rows will not be considered.

    When you set up the where clause, you could set it to only filter the source database. This will mean than any 'active' rows in the source will be paired with the matching row in the target, regardless of if it is active or not.

    I hope this helps.
    Chris
  • I had the where clause editor set to use the same where clause in both tables. When I set it to pick "active" from one table I'm seeing what I expected.
    Thank you
    AlanCHB
Sign In or Register to comment.