Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9069

Re: CITY WISE SALES PERFORMANCE REPORT

$
0
0

Hi,

 

Please try this query,

 

Select [Location] as Location, [1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12]

 

 

from (

 

 

SELECT month(T0.[DocDate]) as M, T2.[Territory] as Location , T0.[DocTotal] as Total FROM OINV T0  INNER JOIN INV1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN OCRD T2 ON T0.[CardCode] = T2.[CardCode] WHERE year(T0.[DocDate]) = 2012

group by T0.[DocDate], T2.[Territory], T0.[DocTotal] )s

 

 

Pivot

(Sum(Total) for M IN ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12]))P

 

Thanks


Viewing all articles
Browse latest Browse all 9069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>