0

I get the ORA-01036 error whenever I try to write a string concatenated with a function of TO_CHAR type.

After reading stefan.schwetschke's answer on ORA-01036: illegal variable name/number when running query through C#

I realized I might be having some concatenation issues after having tried:

SELECT 
'Please output this date ' || TO_CHAR(sysdate, 'DD-MM-YYYY HH24:MI')
FROM dual

Is there any way of setting a variable within the string avoiding both the use of concatenation and of the DBMS_ASSERT package ?

The expected output is today's date with the time in this format:

please output this date 04-03-2019 16:30

Thank you very much for your help.

2
  • 4
    The SQL you posted works just fine. If you're having an issue within a PL/SQL block, or from a C# connector, please post the details on those and the exact code that's failing. Commented Apr 3, 2019 at 15:35
  • have you tried adding an alias to that column? Commented Apr 3, 2019 at 18:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.