Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 29 Jul 2009 @ 18:17:28 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Any way to avoid outer join or splitting view.
 
From:   Anomy Anom

<-- Anonymously Posted: Wednesday, July 29, 2009 13:56 -->

Hi Suhail,

Thank you very much for your reply it was very helpful.

I am still working on tuning that.. view. Please through some light any one if you could to tune this.

Suggest me if there is better way to write this query.

     select 
     FROM
         V1

         INNER JOIN
         V2.
         ON v1.KEY1 = v2.KEY1
        AND V1.KEY2 = V2.KEY2

         LEFT OUTER JOIN
         T1
         ON t1.  = V2. 
         AND t1.  = v2. 

         LEFT OUTER JOIN
         V3.
         ON v1.KEY1 = v2.KEY1

         LEFT OUTER JOIN
         V4
         ON v1.KEY1 = v4.KEY1

         LEFT OUTER JOIN
         V5
         ON v1.KEY1 = v5.KEY1
         AND v1.key2 = v5.key2

         LEFT OUTER JOIN
         V6
         ON v1.KEY1 = v6.KEY1
         AND v1.key2 = v6.key2

         LEFT OUTER JOIN
         v7
         ON v1.KEY1 = v7.KEY1
         AND v1.key2 = v7.key2

         LEFT OUTER JOIN
         V8
         ON v1. = v8. 
         AND v1.  = v8. 


         WHERE v1.  NOT IN ('value1','value2')
       );

PLEASE NOTE : HERE KEY1 IS ALWAYS SAMEFIELD AND IT IS PI. AND KEY2 IS PPI(DATE FIELD)


Thanks & Regards

B CHEERS:-)



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023