on 08-11-2014 4:42 PM
Hi,
I have 500 tables (user defined) at schema 'SAPABC' in HANA db and would like to get a record count of each of them, how can get it in the following format :
SCHEMA_NAME TABLE_NAME Records
SAPABC /BIC/SZVOYAGE 500000
SAPABC /BIC/EZADFC001 2000
Thank you
Jonu Joy
Did you try with
SELECT schema_name, table_name, record_count from M_CS_TABLES
In case the table is partitioned, you may have to sum(record_count) with grouping on schema_name, table_name.
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, may be you can create a table (T_TABLES) with just one column (C_TAB_NAME). Insert your 500 table names to this table and then set up a join with M_CS_TABLES and T_TABLES on table_name = t_tab_name and get the output.
You can always modify the records from T_TABLES and get the output.
Ravi
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.