Counting number of rows that resides in a partition/subpartiton
Hi,
I need to get the number of rows from a subpartition named (G2EDC_LOG_200704_20070407 ) in edc_log_test . Here is the below query which I am going to use to get the count of records.
Also I need to know if I can combine this query with out using UNION ALL.
Thanks in advance.
Jay
SELECT count(el.batch_nbr)
FROM edc_log_test el,
edc_batch_test eb
WHERE el.batch_nbr = eb.batch_nbr
AND eb.status IN ('SUSPENDED' ,'BALANCED' )
AND (eb.user_status = 'CLOSED'
OR eb.user_status IS NULL)
AND TO_CHAR(capture_date,'YYYYMMDD') >= sysdate - 60
AND nvl(do_not_remit, 0) <> 0
UNION ALL
SELECT count(el.batch_nbr)
FROM edc_log_test el,
edc_batch_test eb
WHERE el.batch_nbr = eb.batch_nbr
AND eb.status IN ('SUSPENDED')
AND eb.user_status IN ('NEW', 'OPEN')
AND TO_CHAR(capture_date,'YYYYMMDD') >= sysdate - 365
AND nvl(do_not_remit, 0) <> 0