I have below procedure inside package:
PROCEDURE test1
IS
InsertST varchar2(32000) : = 'INSERT INTO tableA (col1, col2)
(select cola,
INITCAP(REPLACE(colX, '_', ''))
from tableB))';
Begin
execute immediate InsertST;
END
during compilation I got error:
Error(1177,45): PLS-00103: Encountered the symbol "_" when expecting one of the following: * & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like like2 like4 likec between || member submultiset
Something is wrong with "_"
inside function: INITCAP(REPLACE(colX, '_', ''))
How to fix it? Maybe is other way?