HI,

I've this stored procedure:

CREATE OR REPLACE procedure ST_DAT (NAME_IN VARCHAR2) as


BEGIN

insert into REP_NAME
select COD_ID,DESCR_ID,AREA, NAME_IN, sysdate
from REP_TAB;

COMMIT;

END ST_DAT;
/

this procedure is called from an external program

It run correctly, but I have any problem when I tried to insert into tab REP_NAME one value of NAME_IN
with apostrophe.

for example if I write (from external program) Mary run correctly, but If I write Mary's Bar I get
this error:

ORA-01756: quoted string not properly terminated.

I tried with REPLACE:

insert into REP_NAME
select COD_ID,DESCR_ID,AREA, REPLACE(NAME_IN,'',''''), sysdate
from REP_TAB;

BUT I GET SAME ERROR:

How can I call this procedure with apostrophe?

Thanks in advance!