Show TOC

Changes to Define SubscriptionLocate this document in the navigation structure

The syntax for the define subscription command has been modified. The command now supports "and", "or", and "in value list" operators in subscription where clauses. The only limitation is that each sub-clause in "and" and "or" must conform to the standards that SAP Replication Server currently accepts. Syntax and examples below illustrate the use of these operators.

Syntax with and, or and in value list operators in the where clause:
define subscription sub_name
for {table_rep_def | function_rep_def |
      publication pub_name | database replication definition
db_repdef
with primary at data_server.database} |
with replicate at data_server.database
[where 
      {{column_name | @param_name}
      {< | > | >= | <= | = | &} value
      [and {column_name | @param_name}
      {< | > | >= | <= | = | &} value]...
      [or where { column_name | @param_name }
      {< | > | >= | <= | = | &} value
      [and {column_name |@param_name}
      {< | > | >= | <= | = | &} value]...]}  |
      {{column_name | @param_name}
      in (value1,value2,value3...)
      [and {column_name | @param_name}
      in (value1,value2,value3...)]...
      [or where { column_name | @param_name }
      in (value1,value2, value3...)
      [and {column_name |@param_name}
      in(value1,value2,value3...)...]...]}]
[subscribe to truncate table]
[for new articles]
[use dump marker]

Examples:

  • Define a subscription while using the in value list operator:

    define subscription tb_name_subdemo
    for tb_name_repdefdemo
        with replicate at rqa10.tdb2
        where col2 in ('charvalue0','charvalue2', 'charvalue3','charvalue4')
        or where col3 in ('varcharvalue0')
  • Define a subscription while using the and and or operators:

    define subscription tb_name_demo
    for tb_name_repdefdemo
        with replicate at rqa10.tdb2
        where col1 > 20
        and col1 < 100
        or where col2 = 'charvalue0'
        or where col3 = 'varcharvalue0'

For more information, refer to the SAP Replication Server Reference Manual.