Filter Table Rows

Replication Wizard Help

Replication Wizard Help

Filter Table Rows

You can filter the rows in a table to reduce the amount of data being published. The filter statement must refer only to columns and values in that table. Filters cannot refer to data in other tables to determine whether rows of this table are included or excluded.

Click the properties button (...) to enter the WHERE clause used as the filter.

Using row filters, you can specify a subset of rows from a table to be published. Row filters can be used when only specific rows need to be propagated to Subscribers, to eliminate rows that users do not need to see (such as rows that contain sensitive or confidential information), or to create different partitions of data that are sent to different Subscribers. For those applications that can, publishing different partitions of data to different Subscribers can also help avoid conflicts that would otherwise be caused by multiple Subscribers updating the same data values.

If you are creating a merge publication, you can extend filtering to a related table by creating a join filter, or if you have enabled dynamic filters for the publication, you can specify a user-defined function or system function for the row filter.

To specify a dynamic filter for a merge publication

  • Click the properties button (...) to enter the WHERE clause and use a system function, such as SUSER_SNAME(), or a user-defined function as the criteria for the filter.

To specify a join filter for a merge publication

  1. Filter the rows in a table by clicking the properties button (...) to enter the WHERE clause used as the filter.

  2. Click the Create JOIN statement under the Filtered Table column. The table name that is being filtered in the row filter appears as a row.

  3. Click under Table to Filter and select the table to filter from the drop down box.

  4. Click on the properties button (...) under JOIN Filter Clause and enter the WHERE clause used for the join filter.

See Also

Dynamic Filters

Join Filters

Row Filters