AS> I want to split the Mov_date's summation in each month 
AS>
AS> mov_date(for jan) , feb, mar..... etc till the given month

Surely you could simply use SQL's DATEPART() function and then group by
the month like so:

select sum(e.e_to) , e.ac_cr, a.ac_ename, datepart(mm, mov_date)
from entry e inner join ac_idx a on (e.ac_cr = a.ac_id)
where e.mov_date between '01/01/2010' and '10/10/2010' and AC_CR between
'01-01-001' and '31-05-015'
group by e.ac_cr , a.ac_ename, datepart(mm, mov_date)
order by e.ac_cr

Regards,

Cord Schneider
StaffPlan Ltd
http://www.staffplan.co.uk/



Reply via email to