Hello Every one !
i am trying to make query to show the growth of sale of the product month wise ,i have one table name Sales .having following fields , SalesID,ProductID,amt,Qty,SalesDate
i use this query to show my records
select ProductID,Amt,Qty,substring (datename(month,SalesDate ),1,3)as months,DATENAME(YEAR,salesdate ) as years
this query shows my records in this way
-------------------------------------------
ProductID*****Amt*****Qty*****months*****years
----------------------------------------------
1****************400********6**********Dec**********2011
2****************300********4**********Jan**********2012
----------------------------------------------
I WANT TO SHOW MY RECORDS IN THIS WAY
-------------------------------------------
ProductID*****Amt*****Per.MonthQty*****Cur.MonthQty*****months*****years
------------------------------------------------------------------------
1****************400**********0****************6*************Dec******2011
2****************300**********6****************4*************Jan******2012
------------------------------------------------------------------------
sorry if you are feeling bad after reading it ,
can any one help me to solve this prob :(
Regards
M.Waqas Aslam