RDOHELP72.HLB  —  Replication Option, DEFINE_TRANSFER, Format  RSE
  (B)0rse =

  qqwqqqqqqqq>qqqqqqqqwqq> relation-clause qq>qqqqqqqqqqqqqqqqqqqqk
    mq> first-clause qj                                           x
  lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
  mwqqqqqqq>qqqqqqqqwqwqqqqqqqq>qqqqqqqqqqwqqwqqqqqqqq>qqqqqqqqwqqq>
   mq> with-clause qj mq> reduce-clause qqj  mq> sort-clause qqj

    The record selection expression (RSE) used to identify records
    from the source database that Replication Option includes in
    a record stream and transfers to the target database. The RSE
    specifies conditions that individual records must satisfy in
    order to be included in the transfer to the target database.

    Replication Option supports COMPUTED_BY fields named in an RSE
    if the fields are defined using the value expressions shown in
    the value-expr syntax diagram in this section. If the fields are
    not defined by a supported value expression, you will receive a
    fatal error message.

    In extraction, extraction rollup, and replication transfers,
    you can use a relation-clause and with-clause. In extraction and
    extraction rollup transfers, you can also use a first-clause,
    reduce-clause, and sort-clause.

1  –  first-clause

  (B)0first-clause =

  qqqq> FIRST qqqqqq> value-expr qqqqqqqqqqq>

  (B)0value-expr =

     qqqqqqqwqqqq> database-field qqqqqqwqq>
            tqqqq> quoted-string qqqqqqqu
            tqqqq> numeric-literal qqqqqu
            tqqqq> arithmetic-expr qqqqqu
            tqqqq> missing-value qqqqqqqu
            tqqqq> concat-expr qqqqqqqqqu
            tqqqq> ( value-expr ) qqqqqqu
            mqqqq> q  qq> value-expr qqqj

    Specifies how many records are selected from the record stream
    formed by the record selection expression (RSE). You can only
    use the first-clause for an extraction or an extraction rollup
    transfer. If you specify a first-clause for a replication
    transfer, Replication Option issues an error message.

2  –  relation-clause

  (B)0relation-clause =

  q> context-variable q> IN wqqqqqqqq>qqqqqqqqwq> relation-name q>
                            m> db-handle q> . j

    The context variables and relations to be included in the record
    stream or loop.

    If you specify a view name in the relation-clause, the moved view
    becomes a relation in the target database.

    The context-variable supplies a temporary name to identify the
    record stream. Once you have associated a context-variable with
    a relation, you use the context-variable to refer to fields from
    that relation.

    The db-handle is a host variable or name used to refer to a
    specific database you have invoked.

    In extraction or replication transfers, you should not use
    database handles in the RSE of a MOVE RELATION clause. Replication
    Option returns an error message if you include a database
    handle in the RSE. However, in an extraction rollup transfer, you
    must use database handles in the RSE to specify the relation or
    Replication Option will return an error message.

3  –  with-clause

  (B)0with-clause =

  qqqqqqqqqqqqq> WITH qqqqqqqqqq> conditional-expr qqqqqqqqqqq>

  (B)0conditional-expr =

   qwqqq> conditional-expr qq> AND qq> conditional-expr qqqwqqq>
    tqqq> conditional-expr qq> OR qqq> conditional-expr qqqu
    tqqqqqqqqqqqqqqqqqqqqqqqq> NOT qq> conditional-expr qqqu
    tqqq> value-expr1 qq> rel-oper qq> value-expr2 qqqqqqqqu
    tqqq> between-clause qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
    tqqq> containing-clause qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
    tqqq> matching-clause qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
    tqqq> starting-with-clause qqqqqqqqqqqqqqqqqqqqqqqqqqqqu
    mqqq> missing-clause qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

    The with-clause contains a conditional expression that allows
    you to specify conditions that must be true for a record to be
    included in a record stream.

4  –  reduce-clause

  (B)0reduce-clause =

  qqqqqqqqqqqqqq> REDUCED TO qqqwqqqqq> value-expr qqqwqqqqq>
                                mqqqqqqqq , <qqqqqqqqqj

  (B)0value-expr =

     qqqqqqqwqqqq> database-field qqqqqqwqq>
            tqqqq> quoted-string qqqqqqqu
            tqqqq> numeric-literal qqqqqu
            tqqqq> arithmetic-expr qqqqqu
            tqqqq> missing-value qqqqqqqu
            tqqqq> concat-expr qqqqqqqqqu
            tqqqq> ( value-expr ) qqqqqqu
            mqqqq> q  qq> value-expr qqqj

    Allows you to eliminate duplicate values for fields in a record
    stream. You can use the reduce-clause for an extraction or an
    extraction rollup transfer. If you specify a reduce-clause for
    a replication transfer, Replication Option issues an error
    message.

5  –  sort-clause

  (B)0sort-clause =

  qqq> SORTED BY qqwqwqqqqqqqqqqqqqqqqqqwqqqqq> value-expr qqwqqq>
                   x tqq> ASCENDING qqqqu                    x
                   x mqq> DESCENDING qqqj                    x
                   mqqqqqqqqqqqqqqqqqqqqqq , <qqqqqqqqqqqqqqqj

  (B)0value-expr =

     qqqqqqqwqqqq> database-field qqqqqqwqq>
            tqqqq> quoted-string qqqqqqqu
            tqqqq> numeric-literal qqqqqu
            tqqqq> arithmetic-expr qqqqqu
            tqqqq> missing-value qqqqqqqu
            tqqqq> concat-expr qqqqqqqqqu
            tqqqq> ( value-expr ) qqqqqqu
            mqqqq> q  qq> value-expr qqqj

    Allows you to sort the records in the record stream by the values
    of specific fields. You can sort the records according to a
    value expression called a sort key. The sort key determines the
    order of the records in the record stream. You can use the sort-
    clause for an extraction or an extraction rollup transfer. If
    you specify a sort-clause for a replication transfer, Replication
    Option issues an error message.

    Specifying ASCENDING (the default) causes the records to be
    sorted in ascending order. Specifying DESCENDING causes Oracle Rdb
    to sort the records in descending order.

    The value expression specifies the sort value. This value is
    called the sort key.
Close Help