Horizontal and Vertical Filtering
During the publication
creation process, you could have done some filtering of the data,
either horizontally or vertically (or both at the same time). Figure 19
illustrates all you need to do to vertically filter (in terms of
limiting what gets published to a subset of columns of a table). As you
can see, you uncheck the AccountNumber column for the Customer
table so that it isn’t included in the article for that object in this
publication. This might be done because account number information needs
to be more tightly controlled within your company and shouldn’t be part
of what is viewed by any subscribing systems.
Figure 19. Specifying a vertical filter on the Customer table (limiting the columns to be published).
In addition, you can specify
horizontal filters by using the Filter Rows option on a publication
(publication properties). This allows you to specify horizontal
filtering on any table you publish. Figure 20 shows a typical row filter on the Customer table that results in publishing North East Territory customers only (that is, those with TerritoryID values of 1 or 2).
Figure 20. Specifying a horizontal filter on the Customer table (limiting the rows to be published).
Join filtering allows you to limit the rows you will publish, via join criteria, to another table. Figure 21 shows a complex join that filters SalesOrderHeader rows that correspond to North East Territory customers only (that is, those with TerritoryID values of 1 or 2).
Figure 21. Specifying a join filter on the SalesOrderHeader table (limiting the sales rows that will be published by joining for the North East customers only).