Archives of the TeradataForum
Message Posted: Fri, 05 Dec 2008 @ 20:07:30 GMT
Here is the converted query for delete operation.
Double check whether the valid data is getting deleted before performing the deletion.
delete from DB.forecast_table where FRC_CD = 52 and run_dt in ( select run_Dt from ( SELECT RUN_DT, RANK() OVER (ORDER BY RUN_DT) FROM DB.forecast_table WHERE FRC_CD = 52 GROUP BY RUN_DT QUALIFY RANK() OVER (ORDER BY RUN_DT) >24 ) b );
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|