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

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » Working with UltraLite Databases » Working with UltraLite publications

Publishing whole UltraLite tables Next Page

Publishing a subset of rows from an UltraLite table

A publication can only contain specific rows of a table either by. Whether or not you use Sybase Central or Interactive SQL, a WHERE clause limits the rows that will be uploaded to those that:

To upload all changed rows, do not specify a WHERE clause.

Palm OS

You cannot use a CREATE PUBLICATION statement with a WHERE clause on this platform.

What you cannot use in a 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:

These conditions are not enforced but breaking them can lead to unexpected results. Any errors relating to the WHERE clause are generated at runtime, and not when the publication is defined.

Sybase Central

In Sybase Central, you can perform this task while working with the connected database.

To publish only some rows in an UltraLite table (Sybase Central)
  1. Connect to the UltraLite database.

  2. Open the Publications folder.

  3. Create a new publication.

    Choose File > New > Publication. The Create Publication wizard appears.

  4. Enter 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 Tables on the right.

  6. On the WHERE Clauses tab, select the table and enter the search condition in the lower box. Optionally, you can use the Insert dialog to assist you in formatting the search condition.

  7. Click Finish.

Interactive SQL

In Interactive SQL, you can perform this task with the CREATE PUBLICATION statement.

To create a publication in UltraLite using a WHERE clause (Interactive SQL)
  1. Connect to the UltraLite database.

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

    Example    The following example creates a single-article publication that includes all sales order information for sales rep number 856:

    CREATE PUBLICATION pub_orders_samuel_singer
     ( TABLE SalesOrders
         WHERE SalesRepresentative = 856 )
  3. See also