Specifying a where Clause with the create article Command

You can include one or more where clauses in an article. A where clause sets criteria for the column or parameter values that are to be replicated.

If you omit the where clause, Replication Server copies all rows for columns specified in the table replication definition or all parameters specified in the function replication definition.

The where clause syntax for articles is:
[where (column_name | @param_name) 
      {< | > >= | <= | = | &} value
    [and {column_name | @param_name}
      {< | > >= | <= | = | &} value]...]
    [or where (column_name | @param_name) 
      {< | > >= | <= | = | &} value
    [and {column_name | @param_name}
      {< | > >= | <= | = | &} value]...]
...

Each column name in a where clause must be listed in the searchable columns list of the table replication definition. The value for each column must have the same datatype as the column to which it is compared.

Note: Each where clause in an article is joined by the or operator. However, the !=, !<, !>, and or operators are not supported inside a where clause. The & operator is supported only on rs_address columns.
The following example creates an article named titles_art for the publication named pubs2_pub, using a where clause that limits replication to rows where the value in the type column is ‘popular_comp.’
create article titles_art
    for pubs2_pub with primary at TOKYO_DS.pubs2
    with replication definition titles_rep
    where type = 'popular_comp'

See Replication Server Reference Manual > Replication Server Commands for complete syntax and usage guidelines.

Related concepts
Bitmap Subscriptions
Related tasks
Using the rs_address Datatype