PLSQL Special Character in input parameter is not being passed

Viewed 583

Please find below my function:

CREATE OR REPLACE FUNCTION TESTER_TESTING (    P_STRING         IN VARCHAR2) 
RETURN NUMBER IS
BEGIN
Dbms_Output.Put_Line('P_STRING:'||P_STRING);
return 1;
END TESTER_TESTING;
/

When i execute from sqlplus using:

DECLARE 
  RetVal NUMBER;
  P_STRING VARCHAR2(32767);

BEGIN 
  P_STRING := '006µ-540';
  RetVal := VISION.TESTER_TESTING ( P_STRING );
  DBMS_OUTPUT.Put_Line('RetVal = ' || TO_CHAR(RetVal));
  DBMS_OUTPUT.Put_Line('');
COMMIT; 
END; 
/

Output is: P_STRING:006??-540 RetVal = 1

Output

Please advise on why the special character is not being passed & how to fix it.

-Oracle Version: 11g
-Linux: RHEL 7.2
-Script executed using sqlplus.
2 Answers
Related