Do you think, this will hit the table tab1 twice?
Regards,
Jignesh Makwana.
On 12/02/2011 12:13 PM, faizal mangattil` wrote:
USE THIS QUERY
SELECT REC,TOT FROM
(SELECT COUNT(*)TOT FROM TAB1 WHERE rpt_num = 20)a,
(SELECT COUNT(*)REC FROM TAB1 WHERE rpt_num = 20 AND action_flag = 'Y')B;
On 2/12/11, gayathri Dev<[email protected]> wrote:
Hi All,
I want to count the total record and record count which has 'Y' flag
together. How can I do that?
eg:
select count(*)
from tab1
where rpt_num = 20
select count(*)
from tab1
where rpt_num = 20
and action_flag = 'Y'.
How can i combine this?
Thanks,
G
--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en