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.

Kaushik Nayak
  • 30,772
  • 5
  • 32
  • 45
user94028
  • 5
  • 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. – Mat Apr 03 '19 at 15:35
  • have you tried adding an alias to that column? – Mario Apr 03 '19 at 18:34

0 Answers0