pl/slq procedures – POSITIVE and POSITIVEN as IN OUT parameters

5 pts.
Tags:
Data Types
Oracle
PL/SQL
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?

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following