CREATE OR REPLACE PROCEDURE P_TEST(P_F IN VARCHAR2)
IS
V_T VARCHAR2(10);
BEGIN
V_T := p_f;
DBMS_OUTPUT.PUT_LINE('V_T: '||V_T);
END;
what i am trying to do is if someone calls the above procedure with value 'Y' (value would be Y), I want to add a single quote to the input parameter,
so if you call the above proc with 'Y', (value is Y), i want to add a single quote to it so the value would be 'Y')
BEGIN
P_TEST(P_F=> 'Y');
END;
/
Trying regexp_replace but not able to do it;
select regexp_replace('Y',*,'''Y''') FROM DUAL
Even a simple replace i am not able to get the 'Y'
SELECT REPLACE('Y','''''Y''''') FROM DUAL