Solved

ORA-01861

  • 2 May 2018
  • 1 reply
  • 70 views

'ORA-01861 Literal does not match format strings'

I keep getting this error when I want te deploy and execute my table. I tried the troubleshoot option: delete the table by using the SQL Server Cleanup Tool, but this doesn't seems to work in my case.

The field that gets the error is my Regestration Date with data type 'DATE'. This field also contains dates before 1753-1-1 (I guess typos). I've added a data selection rule and then I get the ORA error.

You guys got a solution for this problem?

icon

Best answer by wynkoop 3 May 2018, 21:03

View original

1 reply

Badge

Hi Rik,

To resolve this problem, please remove your data selection rule and check the "Convert out of range dates" box.

The ORA-01861 error can be caused when doing a date conversion in Oracle.  I suspect that date format you are using in your data selection rule isn't one that Oracle likes.  If you need to do a data selection rule based on date, we'll have to have a closer look at how you do that, but with conversion you shouldn't need the selection rule anymore. 

The reason you were getting the original "out of range" error message is that Oracle's date format is allows a much larger range of values than SQL, so the defaults can sometimes be smaller than SQL Server's datetime value can contain. 

If you need to preserve these out of range dates, you can also use data overrides to use DateTime2 instead of DateTime.  That can handle all of the possible date values in the Oracle Date data type.  

Please let us know if this helps!

Reply