I have tried both[CAST & TO_NUMBER] method but non of worked to cast values that is returned from another procedure.
SELECT DBMS_LOB.SUBSTR(SUBSTR(DETAIL_LOB, 2300, 4), 2000)
INTO RES
FROM lONG_TO_CLOB_TEMP_TABLE;`
RES VALUE IS 40 returned by above query.
RES datatype is varchar2.
Now I want to convert that RES value into number so that I can do some arithmetic operation with this.
like => 100/RES
Not working code =>
V_TEMP := CAST(RES AS NUMBER)
V_TEMP := TO_NUMBER(RES)
Error Message => "ORA-06502: PL/SQL: numeric or value error"