Skip to content
Advertisement

ORA-01861: the value does not match the format string

I have this External Table:

I created this function to return the week number of the year

If I only run the function it tells me that everything has been compiled. But when i run the SELECT it gives me the following error:

[I enter the dates like this: ‘2020/01/01′ but sql-developer on the control query shows them to me like this ’01-JAN-20’. I don’t know if this info is important]

How I fix that?

Advertisement

Answer

You are converting a date field into again date which seems to be throwing an error.

Also, You are trying to compare date field dtIn with string. The string should be converted to date before comparing with the date filed (dtIn >= '2020-01-01')

Try the following query in your function:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement