I want to see Report monthwise

  • it's urgent... if you are not getting my problem then let me know...

  • please help me....

  • Try using isnull(sum(a),0) amount.

    ---
    Thinking is the hardest work there is, which is the probable reason so few engage in it.

    Sunitha
    😎

  • I think you are not getting my problem. My problem is that if i am not submitting bill in May.Then you group data with month. Then May will not come into picture as you can see my o/p metioned above. But i want 'May' month also in my o/p having amount 0.

  • select decode(t.month,1,'JAN',2,'FEB',3,'MAR',4,'APR',5,'MAY',6,'JUN',7,'JUL',8,'AUG',9,'SEP',10,'OCT',11,'NOV',12,'DEC'),

    case when (d.amount = '' OR d.amount is null) then 0 else d.amount end amount from (

    select 1 month from dual

    union

    select 2 month from dual

    UNION

    select 3 month from dual

    union

    select 4 month from dual

    UNION

    select 5 month from dual

    union

    select 6 month from dual

    UNION

    select 7 month from dual

    union

    select 8 month from dual

    UNION

    select 9 month from dual

    union

    select 10 month from dual

    UNION

    select 11 month from dual

    union

    select 12 month from dual) t

    left outer join

    (Select sum(a) amount,to_char(d,'mm') month from A

    where to_char(d,'YYYY')=2008

    group by to_char(d,'mm')) d on

    t.month = d.month ORder by t.month;

    You can avoid the 't' table above using one simple table.

  • great man......... it is working... i modified little bit....

    thanks a ton.........

Viewing 6 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply