(B)0[mrse = 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)0[mfirst-clause = qqqq> [4mFIRST[m qqqqqq> value-expr qqqqqqqqqqq> (B)0[mvalue-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)0[mrelation-clause = q> context-variable q> [4mIN[m 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)0[mwith-clause = qqqqqqqqqqqqq> [4mWITH[m qqqqqqqqqq> conditional-expr qqqqqqqqqqq> (B)0[mconditional-expr = qwqqq> conditional-expr qq> [4mAND[m qq> conditional-expr qqqwqqq> tqqq> conditional-expr qq> [4mOR[m qqq> conditional-expr qqqu tqqqqqqqqqqqqqqqqqqqqqqqq> [4mNOT[m 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)0[mreduce-clause = qqqqqqqqqqqqqq> [4mREDUCED[m [4mTO[m qqqwqqqqq> value-expr qqqwqqqqq> mqqqqqqqq , <qqqqqqqqqj (B)0[mvalue-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)0[msort-clause = qqq> [4mSORTED[m [4mBY[m qqwqwqqqqqqqqqqqqqqqqqqwqqqqq> value-expr qqwqqq> x tqq> [4mASCENDING[m qqqqu x x mqq> [4mDESCENDING[m qqqj x mqqqqqqqqqqqqqqqqqqqqqq , <qqqqqqqqqqqqqqqj (B)0[mvalue-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.