Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I want to use Pivot for the month this commented pivot is in access But how this query properly work for sql server

SQL
Select [IPS].[Date],[IPS].[KPI Name],[KPI].[Graph Display],[KPI].[SortOrder],[IPS].[Value KPI] As KPI 
 From [Internal_Performance] As IPS,
  Map_KPI_Master As KPI 
  Where [IPS].[KPI Name] = [KPI].[KPI Name]  And
    [KPI].[PerformanceTrendInternal]= 1 And 
    [IPS].[Calculation Period]='Month'  And
     [IPS].[Level1]='GlaxoSmithKline' And 
     [IPS].[Currency]='GBP' And [IPS].[Country]='France') As Data
      Where (KPI<>Null Or Not KPI is null) Group By 
      Data.[Graph Display],Data.[KPI Name],Data.[SortOrder] Order By Data.[SortOrder] 
      --Pivot Month([Data].[Date])
Posted
Updated 19-Sep-12 1:23am
v2
Comments
Ganesan Senthilvel 19-Sep-12 12:04pm    
You can refer SQL Server Power Pivot function: http://www.microsoft.com/en-us/bi/powerpivot.aspx

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900