Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: How to create procedure for header table and item table

$
0
0

Hi Folks,

 

This is my use case

 

1) Select fact records from tables (say A,B,C,D ) with suitable Joins and certain Where conditions

    SELECT ordid FROM TABLES A,B,C,D on join condition where ....

2) Using above header records , I have to select each and every item level data from different tables ( say X,Y,Z ) and perform calculation to derive new columns to update a new table ( Zreport )

 

UPDATE TABLE ZREPORT

SET col1 = ( Select qty  FROM TABLE X WHERE ordid = A.ordid

 

UPDATE TABLE ZREPORT

SET col2 = ( Select price FROM TABLE y WHERE ordid = B.ordid.

 

and so on for other columns..

 

3) Zreport table will be used for reporting.

 

I would like to know the best way to achieve this to gain performance.

 

Appreciate the help!

 

Thanks

Sourav


Viewing all articles
Browse latest Browse all 9165

Trending Articles



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