Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

TUNING THE join - response (2) by harshita45

$
0
0
Hi Dieter, First of all thank you very much for the reply. It worked fine. But i am getting  REFDB.A.EX_QTY does not exists. i ran the query like below SELECT 'UNKNOWN' , 'UNKNOWN' , 0 , - 999 , C.BR_PARTY_KEY ,  'UNKNOWN' , /* SUM ( A.EX_QTY ) , SUM ( CAST( A.LIST_PRICE_AMT AS DOUBLE PRECISION ) ) , SUM ( CAST( A.NET_PRICE_AMT AS DOUBLE PRECISION ) ) , SUM ( CAST( A.COST_AMT AS DOUBLE PRECISION ) ) , */  'N' , 'N' , 'N' , 'N' , 'N' , 'N' , 'N' , 'N' , 'N' , 'N' , 'N' , 'N' , 'N' , 'N' , 'N' , 'UNKNOWN' ,   'N' , 'N' , 'N' FROM  (    SELECT      CUST_KEY,      SUM ( A.EX_QTY ) AS EX_QTY,      SUM ( CAST( A.LIST_PRICE_AMT AS DOUBLE PRECISION ) ) AS LIST_PRICE_AMT,      SUM ( CAST( A.NET_PRICE_AMT AS DOUBLE PRECISION ) ) AS NET_PRICE_AMT,      SUM ( CAST( A.COST_AMT AS DOUBLE PRECISION ) ) AS COST_AMT    FROM ORDDB.BKGS A    WHERE a.ser_flag = 'N'    GROUP BY 1  ) A, REFDB.CUST_PARTY C WHERE A.CUST_KEY = C.CUST_KEY GROUP BY C.BR_PARTY_KEY   80% of the Cost is reduced.   Thanks once again, Harshitha.

Viewing all articles
Browse latest Browse all 14773

Trending Articles



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