Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 12 Sep 2013 @ 12:48:56 GMT


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


Subj:   Re: Merge delete performance tuning
 
From:   Adharssh.HS

Hi Roopalini,

You can try these queries,

     DELETE FROM C302_PRD_FS_EDW.F_PACE  WHERE (HOTEL_ID||cast(AS_OF_CALENDAR_ID) >
     ( sel HOTEL_ID||CAST(CAST(LAST_PACE_DT  AS DATE FORMAT 'YYYYMMDD' ) AS INTEGER) as LPT
     FROM C302_PRD_FS_STAGE.V_E_OPERA_BATCH_CONTROL
     WHERE OPERA_BATCH_CD='JAC'
     ) ;

OR

Chaning your initial query only for the cast,

     DELETE T1
     FROM C302_PRD_FS_EDW.F_PACE T1,
     C302_PRD_FS_STAGE.V_E_OPERA_BATCH_CONTROL T2  WHERE T1.HOTEL_ID= T2.HOTEL_ID AND
     T1.AS_OF_CALENDAR_ID > CAST(CAST(T2.LAST_PACE_DT  AS DATE FORMAT 'YYYYMMDD' ) AS CHAR( 8
     ))  AND T2.OPERA_BATCH_CD='JAC'

Thanks & Regards,

Adharssh.



     
  <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