2. Add the table to the publication. You do this by executing the

sp_add_article procedure:

sp_add_article publication-name, table-name go

The sp_add_article procedure adds a table to a publication. By default, all columns of the table are added to the publication. If you wish to add only some of the columns, you must use the sp_add_article_col procedure to specify which columns you wish to include.

3. Add individual columns to the publication. You do this by executing the

 

sp_add_article_col procedure for each column:

 

sp_add_article_col publication-name,

 

table-name,

 

column-name

 

go

Example

The following commands add only the rep_key column of the table

 

SalesRep to the SalesRepData publication:

 

sp_add_remote_table ’SalesRep’

 

sp_add_article ’SalesRepData’,

 

’SalesRep’

 

sp_add_article_col ’SalesRepData’,

 

’SalesRep’,

 

’rep_key’

 

go

Creating articles containing some of the rows in a table

There are two ways of including only some of the rows from a table in an article:

WHERE clause You can use a WHERE clause to include a subset of

 

rows in an article. All subscribers to the publication containing this

 

article receive the rows that satisfy the WHERE clause.

 

subscription column You can use a subscription column to include a

 

different set of rows in different subscriptions to publications containing

 

the article.

Allowed clauses

In SQL Remote for Adaptive Server Enterprise, the following limitations

 

apply to each of these cases:

 

WHERE clause limitations The only form of WHERE clause

 

supported is the following:

 

WHERE column-name IS NOT NULL.

144

Page 162
Image 162
Sybase DC38133-01-0902-01 manual Creating articles containing some of the rows in a table