Skip to Content
0
Jun 22, 2015 at 03:34 PM

Oracle ORA-06550 error... sometimes

204 Views

I have a stored procedure and a function used to return a result set to PowerBuilder as follows:

CREATE OR REPLACE PROCEDURE elig.sp_getMembers(as_member IN varChar2, as_lName IN varChar2, as_fName IN varChar2, member_data OUT SYS_REFCURSOR)

AS

BEGIN

member_data := elig.sf_GetMembers(as_member, as_lName, as_fName);

END sp_getMembers;

CREATE OR REPLACE FUNCTION elig.sf_getMembers(as_member varChar2, as_lName varChar2, as_fName varChar2)

OPEN member_data FOR

SELECT prsn.memo_key,

prsn.pers_nbr,

prsn.ssn AS ssn,

prsn.dob,

prsn.gender,

prsn.internet_opt_out,

Trim(prsn.lName || Decode(prsn.sName, NULL, '', ' ' || prsn.sName) || ', ' || prsn.fName || ' ' || prsn.iName) AS member_name,

prsn.lName,

prsn.fName,

prsn.ssn AS raw_ssn

FROM person prsn

WHERE prsn.fName LIKE ls_fName;

RETURN member_data;

END sf_getMembers;