cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HANA PIVOT TABLE with SQL Script

0 Kudos
317

Hello ;

I need a pivot table in my code. However I write this with sql , but I can not write in HANA My cod eis here:

--select temp2.*,PivotTable.hesap,("iscilik"/iweightsum)* case when COALESCE("U_isProdCostDist",'N')='N' then "iweight1" else 0 end*"sumquantity" as "isciliktoplam",("uretim"/iweightsum)* case when COALESCE("U_isProdCostDist",'N')='N' then "iweight1" else 0 end*"sumquantity" as "uretimtoplam",("fason"/iweightsum)* case when COALESCE("U_isProdCostDist",'N')='N' then "iweight1" else 0 end*"sumquantity" as "fasontoplam" from temp2, temphesap2 PIVOT  (Max("tutar") FOR tip IN ("iscilik","uretim","fason")) AS PivotTable
 

Could you help me please ?

pfefferf
Active Contributor

Hi "abc u",

please take the time to formulate a proper question with as much details as possible. It is not really enough to post a SQL statement and asking for "translation". Maybe you can share an example of the original data structure, the result data structure, what you have tried so far, what issues you have ...

Regards,
Florian

Accepted Solutions (0)

Answers (0)