Supporting INSERTS at For INSERT statements at a remote database to replicate correctly to the

remote databases consolidated database, you can exclude from an article only columns that can be left out of a valid INSERT statement. These are:

Columns that allow NULL.

Columns that have defaults.

If you exclude any column that does not satisfy one of these requirements, INSERT statements carried out at a remote database will fail when replicated to the consolidated database.

Consolidated

ID

Rep

Dept

 

INSERT

1

Ann

101

Insert fails

INTO SalesRep (ID, Rep)

 

 

 

2

Marc

101

VALUES (3, 'Shih' )

 

 

3

Shih

X

 

 

 

 

 

 

Remote

INSERT

INTO SalesRep (ID, Rep)

VALUES (3, 'Shih' )

ID

Rep

1

Ann

 

 

2

Marc

 

 

3

Shih

 

 

Insert

succeeds

Conditions on rows There are two ways of including only some of the rows in a publication:

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.

In SQL Remote for Adaptive Server Enterprise, the only supported WHERE clause is

WHERE column-name IS NOT NULL

Subscription columns You can use a subscription column to include a different set of rows in different subscriptions to publications containing the article.

For more information on restrictions on rows, see “Creating articles containing some of the rows in a table” on page 144 .

148

Page 166
Image 166
Sybase DC38133-01-0902-01 manual Insert Succeeds