Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » MobiLink - Client Administration » SQL Anywhere clients for MobiLink » SQL Anywhere clients » Publications


Publishing only some rows in a table

When no WHERE clause is specified in an article definition, all changed rows in the table are uploaded. You can add WHERE clauses to articles in the publication to limit the rows to be uploaded to those that have changed and that satisfy the search condition in the WHERE clause.

The search condition in the WHERE clause can only reference columns that are included in the article. In addition, you cannot use any of the following in the WHERE clause:

  • subqueries

  • variables

  • non-deterministic functions

These conditions are not enforced, but breaking them can lead to unexpected results. Any errors relating to the WHERE clause are generated when the DML is run against the table referred to by the WHERE clause, and not when the publication is defined.

 Create a publication using a WHERE clause (Sybase Central)
  1. Connect to the remote database as a user with DBA authority using the SQL Anywhere 12 plug-in.

  2. Open the Publications folder.

  3. Click File » New » Publication.

  4. In the What Do You Want To Name The New Publication field, enter a name for the new publication. Click Next.

  5. Click Next.

  6. On the Available Tables list, select a table. Click Add.

  7. Click Next.

  8. Click Next.

  9. In the Articles List, select a table and enter the search condition in the The Selected Article Has the following WHERE clause pane.

  10. Click Finish.

 Create a publication using a WHERE clause (SQL)
  1. Connect to the remote database as a user with DBA authority.

  2. Execute a CREATE PUBLICATION statement that includes the tables you want to include in the publication and a WHERE condition.

 See also