Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 14 Dec 2011 @ 20:44:00 GMT


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


Subj:   Re: Insert load half of my data
 
From:   Issah, Gabriel

I am using Teradata assistance and my query is straight forward

     iNSERT INTO T_Test.Ac_In
      ( Segmt_Id, Unit_Id, Acct_Id, , Lmt_Acum_Cd, Lmt_Acum_Desc)

     SELECT DISTINCT
        T3.SEGMT_ID ,
        T3.UNIT_ID ,
        T3.Acct_ID ,

        T1.ACIN1  AS  Lmt_Acum_Cd,
        CASE  T1.ACIN1
           WHEN T1.ACIN1 THEN T1.ACIN2

            WHEN T1.ACIN2 THEN T1.ACIN3

            WHEN T1.ACIN3 THEN T1.ACIN4

     ELSE T1.ACIN3

        END AS  Lmt_Acum_Desc

        FROM
       ((Stg_BT.Stg_AccFd T1  INNER JOIN T_Test.Acct T2
            ON
           T1.InvNum = T2.Mem_NUM )
          INNER JOIN T_Test.unit T3
            ON
           T2.Inv_ID = T3.Inv_ID )
      WHERE
        T1.prodname = T3.prodname  AND
        T1.recID IS NOT NULL

Thanks

Gabriel Issah



     
  <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