471,084 Members | 999 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,084 software developers and data experts.

PL/SQL Function Help

The following function worked in 8i(8.1.7.4) but will not compile in
9i(9.2.0.3). This is a stripped down version with just the error
parts. I am really new at PL/SQL can someone help me out.

Thanks
Larry

CREATE OR REPLACE FUNCTION did_close_test( v2_msg_io IN OUT VARCHAR2,
rt_pa_i IN s2_person_action%ROWTYPE )
RETURN PLS_INTEGER

IS
B_TRUE BOOLEAN := TRUE;
b_moa_ok BOOLEAN := FALSE;
n_rc PLS_INTEGER := 0;

CURSOR c_mon IS
SELECT B_TRUE
FROM s2_action_monitor
WHERE moa_received_date IS NOT NULL
AND moa_signed_date IS NOT NULL
AND person_action_key = rt_pa_i.process_person_action_key;

BEGIN

OPEN c_mon;
FETCH c_mon INTO b_moa_ok;
CLOSE c_mon;

RETURN n_rc;

END did_close_test;
/
Jul 19 '05 #1
1 2771

Exactly, like 'Nobody' says, loose the 'BOOLEAN's

Also, you may not need a cursor:

CREATE OR REPLACE FUNCTION did_close_test( v2_msg_io IN OUT VARCHAR2,

rt_pa_i IN s2_person_action%ROWTYPE )

RETURN PLS_INTEGER

IS

B_TRUE CHAR(1) := '1';

b_moa_ok CHAR(1) := '0';

n_rc PLS_INTEGER := 0;

BEGIN

SELECT B_TRUE

INTO b_moa_ok

FROM s2_action_monitor

WHERE moa_received_date IS NOT NULL

AND moa_signed_date IS NOT NULL

AND person_action_key = rt_pa_i.process_person_action_key;

b_moa_ok:=NVL(b_moa_ok,'0');

RETURN n_rc;

END did_close_test;

/

;)
--
Posted via http://dbforums.com
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Joneseyboy | last post: by
7 posts views Thread by Mike D. | last post: by
4 posts views Thread by George Durzi | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.