StringForever StringForever - 1 month ago 12
SQL Question

SQL can't insert linebreak with CHAR(13): no function with name 'char' exists

Please help me, it's disturbing, I'm trying to insert a simple line break. (Windows)

My PL/SQL code is:
DECLARE str varchar2(32767);
BEGIN str := 'A Text' + char(13) + char(10) + 'Next text';
INSERT INTO atable (...) (str);
END;


I always get the error:


PLS-00222 no function with Name 'CHAR' exists in this scope

Answer

The function is CHR

e.g. -

select chr (65) from dual;

A