The rs_select_count_star function string in SAP Replication Server
gets the number of rows from a primary table.
rs_select_count_star is used by the select thread in subscriptions
created with the direct_load option. You can customize the
rs_select_count_star function string.
select count(*) from <primary table> [<where_clause>]
- Suppose a subscription is created with where
<au_lname> > 1010. In this example, the function
string rs_select_count_star is changed so that it returns
number of rows for table authors where <au_lname> > 1000.
create function string authors.rs_select_count_star;select_count_1 for flat_file_class _function_class with overwrite scan 'select count(*) from authors where au_lname > ?au_lname!user?' output language 'pdb_execute_sql "select count(*) from authors where au_lname >?au_lname!user? - 10"'
should be consistent with
. For example, if you alter the function string for
to select from another table, either:
- Change the function string for rs_select_count_star if
the two tables do not have the same number of rows.
- Do not change the function string for
rs_select_count_star if the two tables have the same
number of rows.