A where clause is an 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 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 schema:
<TablePairs>
<Pair>
<LeftObject Name="HR.EMPLOYEES"/>
<RightObject Name="HR_COPY.EMPLOYEES"/>
<WhereClause>EMPLOYEE_ID != 3</WhereClause>
</Pair>
</TablePairs>
The following xml fragment defines separate where clauses on the employees table for the left and the right schema. On the left schema, it excludes records with EMPLOYEE_ID = 3; on the right schema, it excludes records with EMPLOYEE_ID = 4.
<TablePairs>
<Pair>
<LeftObject Name="HR.EMPLOYEES"/>
<RightObject Name="HR_COPY.EMPLOYEES"/>
<LeftWhereClause>EMPLOYEE_ID != 3</LeftWhereClause>
<RightWhereClause>EMPLOYEE_ID != 4</RightWhereClause>
</Pair>
</TablePairs>