Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 13 Dec 2012 @ 20:00:12 GMT


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


Subj:   Delete query based on target table date
 
From:   Jepamony, Johnpaul

Hi Experts,

I have a requirement to keep only 4 weeks of data in target table based on a date column in the table.

2-Dec, 9-Dec, ?, 23-Dec


I tried to delete the data based on System date - 28 but this condition fails if there is no run for previous week. I.e. There will be data for three weeks instead of four.

Is it possible to get the date from the table and compare with sysdate and delete the data which is more than four week?

Please assist!!


Regards,

John



     
  <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