Hi Friends,
i was assigned a task to develop the report in property manager reports, in my task there is a requirement like follows:
total sum of amount from rctlgda, count of total records from 2 tables i have developed the below query but it is not working.
select
(select sum(amount) from rctlgda) Tot_Amt,
(select count(*) from rctlgda) Tot_cnt,
(select count(*) from rcta) Suc_cnt
from
ra_cust_trx_line_gl_dist_all rctlgda,
ra_customer_trx_all rcta
where rctlgda.request_id = rcta.request_id --> Mapping between 2 table
can any body please help to solve this problem its very very urgent.
we are not able to map the tables with request_id bcos its showing many records. is there a way where we can get the exact sum(amount) and count(*) from the abv tables??
awaiting for your early reply.
Regards,
Azeez
Counts of records in Different tables
-
- Posts: 26
- Joined: Fri Nov 10, 2006 3:15 am
- Location: India
-
- Posts: 615
- Joined: Mon Sep 18, 2006 1:32 am
- Location: United Arab Emirates
- Contact:
select
(select sum(amount) from ra_cust_trx_line_gl_dist_all) Tot_Amt,
(select count(*) from ra_cust_trx_line_gl_dist_all) Tot_cnt,
(select count(*) from ra_customer_trx_all) Suc_cnt
from
ra_cust_trx_line_gl_dist_all rctlgda,
ra_customer_trx_all rcta
where rctlgda.request_id = rcta.request_id
select unique
(select sum(amount) from ra_cust_trx_line_gl_dist_all) Tot_Amt,
(select count(*) from ra_cust_trx_line_gl_dist_all) Tot_cnt,
(select count(*) from ra_customer_trx_all) Suc_cnt
from
ra_cust_trx_line_gl_dist_all rctlgda,
ra_customer_trx_all rcta
where rctlgda.request_id = rcta.request_id
(select sum(amount) from ra_cust_trx_line_gl_dist_all) Tot_Amt,
(select count(*) from ra_cust_trx_line_gl_dist_all) Tot_cnt,
(select count(*) from ra_customer_trx_all) Suc_cnt
from
ra_cust_trx_line_gl_dist_all rctlgda,
ra_customer_trx_all rcta
where rctlgda.request_id = rcta.request_id
select unique
(select sum(amount) from ra_cust_trx_line_gl_dist_all) Tot_Amt,
(select count(*) from ra_cust_trx_line_gl_dist_all) Tot_cnt,
(select count(*) from ra_customer_trx_all) Suc_cnt
from
ra_cust_trx_line_gl_dist_all rctlgda,
ra_customer_trx_all rcta
where rctlgda.request_id = rcta.request_id
Who is online
Users browsing this forum: No registered users and 1 guest