create a tally table and use it like below;With MonthsAS(SELECT id,Startdate,1 AS MonthVal,Maintermsperiod,annualamount,annualamount/Maintermsperiod AS MonthAmtFROM TableUNION ALLSELECT id,DATEADD(mm,1,Startdate),MonthVal + 1,Maintermsperiod,annualamount,MonthAmtFROM MonthsWHERE MonthVal + 1 < = Maintermsperiod)SELECT id,YEAR(Startdate),annualamount AS Sales,MonthVal,MonthAmtFROM MonthsOPTION(MAXRECURSION 0)
------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/