Quantcast
Channel: Dynamic Column month wise
Viewing all articles
Browse latest Browse all 6

Dynamic Column month wise

$
0
0

I am working for a retail Software. I had a complication as follows. I need a Report like Month wise the Product Sales Quantity.  Let say i have Product Code, Quantity and BillDate columns.  I could get this By this Query 

 Select ProductCode, Sum(Qty) as Qty , DateName(month,BillDate ) as MonthName form BillDetail group by ProductCode , DateName(month,BillDate )

 This Record gives me like

     ProductCode      Qty    MonthName 

    101                      5        April 

    101                      2        May

    101                      8        June

    102                      4        May

    102                      5          june.

But What i need is

        Product Code  April   May  June July August September October Upto March as Columns

        101                 5          2      8      0  00   0                                                   102               0   4      5       0     0           0                 0                          


vlogeesh


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images