5 pts.
 pl/slq procedures – POSITIVE and POSITIVEN as IN OUT parameters
Hi, I have a simple PL/SQL procedure with IN and OUT parameter of type POSITIVEN. CREATE or REPLACE PROCEDURE PROC ( inval IN POSITIVEN, outval OUT POSITIVEN ) AS BEGIN outval := inval; END; I pass the value 1 for the IN value using the sql type INTEGER in a jdbc application. But oracle throws a exception ORA-06502: PL/SQL: numeric or value error ORA-06512: at line 1 This works fine if I have a POSITIVE type as parameter. Not sure what the problem might be. Is POSITIVEN allowed as an parameter types for a procedure?

Software/Hardware used:
ASKED: November 12, 2009  7:49 PM
UPDATED: November 12, 2009  10:14 PM

Answer Wiki:
The POSITIVEN type is allowed for IN paramaters only, as the initial value of an OUT parameter is NULL by definition. You should use POSITIVE for the out paramter instead.
Last Wiki Answer Submitted:  November 12, 2009  9:06 pm  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _