Show TOC

rs_select_count_starLocate this document in the navigation structure

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.

Syntax
select count(*) from <primary table> [<where_clause>]
Examples
rs_select_count_star
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.
Sample Code
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"'
Usage
rs_select_count_star should be consistent with rs_select. For example, if you alter the function string for rs_select 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.