Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Pivot Table in Hana

Dear Expert,

                   I am trying the following query in Hana Studio.....

SELECT * from (select T0."ItemCode" as Code, T1."WhsCode" as Whs, sum(T1."OnHand") as Stock FROM OITM T0  INNER JOIN OITW

T1 ON T0."ItemCode" = T1."ItemCode" INNER JOIN OWHS T2 ON T1."WhsCode" = T2."WhsCode" WHERE T2."U_Type_Of_Whs" = 'STATION' 

and T1."WhsCode" <> 'HO'  group by T0."ItemCode",T1."WhsCode" ) P Pivot(Sum(Stock) for Code in (PMS001,AGO001,IK001)

) as pvt

and I am receiving the error incorrect syntax near "Pivot": line

Please suggest the solution.

regards,

PankajK

Former Member
Not what you were looking for? View more on this topic or Ask a question