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 <gd0...@gmail.com> 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 Oracle-PLSQL@googlegroups.com
> To unsubscribe from this group, send email to
> oracle-plsql-unsubscr...@googlegroups.com
> 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 Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to