Sorry, I am confused now. If there are duplicate dates and you afraid of updating the both the dates thinking one could be valide ? As per your initial query, you check for the bad date from SYS_CALENDAR. Now if two dates are duplicates or say same then both could be either good or bad. So I don't get the scenario when there are duplicates and you want to identify one but not other.
If this is a very old table and not getting new data, then you can think of altering it and add one key with a unique identifier like a surrogate key (using row_number probably) and then use that to update that.
↧