Publishing only some rows using a WHERE clause
Youcan specify a WHERE clause to include in the publication only the rows
thatsatisfy the WHERE conditions.
Tocreate a publication using a WHERE clause (Sybase Central)
1. Connect to the database as a user with DBA authority.
2. In the left pane, select the Publications folder.
3. From the File menu, choose New Publication.
ThePublication Creation wizard opens.
4. Type a name for the new publication. Click Next.
5. On the Tables tab, select a table from the list of Available tables. Click
Add. The table is added to the list of Selected Tableson the right.
6. On the WHERE Clauses tab, select the table then type the search
conditionin the lowerbox.
7. ClickFinish.
Tocreate a publication using a WHERE clause (SQL)
1. Connect to the database as a user with DBA authority.
2. Executea CREATE PUBLICATIONstatement that includes the rows you
wishto include in the publication and a WHERE condition.
Examples Thefollowing statement creates a publication that publishes the id,
company_name,city, and state columns of the customer table, for the
customersmarked as active in the status column.
CREATE PUBLICATION pub_customer (
TABLE customer (
id,
company_name,
city,
state )
WHERE status = ’active’
)
Inthis case, the status column is not published. All unpublished rows
musthave a default value. Otherwise, an error occurs when rows are
downloadedfor insert from the consolidated database.
96