A where clause is an SQL expression that is used as a data filter. Only the records that meet the where clause criteria are compared and synchronized. You can specify any valid SQL expression as the where clause. The "where" keyword should not be included in the expression.

The command line supports where clauses via three elements under the <Pair> element:

  • WhereClause: sets a where clause for both members of a pair
  • LeftWhereClause: sets a where clause for the left member of the pair
  • RightWhereClause: sets a where clause for the right member of the pair

The following xml fragment defines a where clauses on the employees table that excludes records with emp_id = 3. The where clause is set for both the left and the right database:

<TablePairs>
     <Pair>
          <LeftObject Name="dbo.employees"/>
          <RightObject Name="dbo.employees"/>
          <WhereClause>emp_id != 3</WhereClause>
     </Pair>
</TablePairs>

The following xml fragment defines separate where clauses on the employees table for the left and the right database. On the left database, it excludes records with emp_id = 3; on the right database, it excludes records with emp_id = 4.

<TablePairs>
     <Pair>
          <LeftObject Name="dbo.employees"/>
          <RightObject Name="dbo.employees"/>
          <LeftWhereClause>emp_id != 3</LeftWhereClause>
          <RightWhereClause>emp_id != 4</RightWhereClause>
     </Pair>
</TablePairs>

 

Total compare from data to schema with IDERA SQL Comparison Toolset. Learn more > >
  • No labels