Using MODIFY to update an Oracle table via ODBC using a date variable as the key may fail to find a match


When trying to update an Oracle table via the ODBC engine it's possible that a match that should be found is not found or worse the wrong record is found.

This occurs when the KEY variable is a DATE variable due to the fact that Oracle's date variables are like our DATETIME variable and not date variables. So instead of the SAS value being interpreted as a date it's being looked at as a datetime and thus an invalid date.

For example for '20MAR2007' the internal value would be 17245. Instead of it being evaluated as 20MAR2007 it would be passed to Oracle equivalent to '01JAN1960:04:47:25'. The use of the SASDATEFMT= option does not change this behavior.