I have the below query regarding an updation basis on the column of EXIT_DATE date, now please advise.
I have the below query. Let's say today is 13 August, so I want to update all records starting on the basis of date 10 Aug , 11 Aug and 12 Aug considering the timestamp also to be very accurate.
In other words, I want to update all records of 3 days back.
Please advise is this query correct, or the below implementation could be improved.
UPDATE CTR_QWE SET STATUS = 'COMPLETED'
WHERE STATUS IN ('N','P')
AND EXIT_DATE >= TRUNC(SYSDATE-3)
AND EXIT_DATE < TRUNC(SYSDATE);