Skip to content
Advertisement

ORA-01756: quoted string not properly terminated, a part of my query it’s failing

Is there something bad in this Query? It’s not the full query it’s just a part of it. I’ts throwing this error:

Advertisement

Answer

Use the q-quoting mechanism.

By the way, your code can be simplified to

No need to to_char and then to_date current_date; it already is DATE datatype, just remove (truncate to midnight) time component.


By the way #2, format mask you used is wrong; should be dd/mm/yyyy hh24:mi:ss (not dd/mm/yyyy 00:00:00)


If you insist (though, I don’t know why would you), then

Does it work? Yes:

Now copy/paste the result into another query and verify it:

Didn’t fail, eh?

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