Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Method in oracle
Hi I have this function
CREATE TYPE BODY licence_t AS MEMBER FUNCTION get_penalty_points RETURN
INTEGER IS
p number;
y number;
BEGIN
select z.penalty_p into p from conv_speed z, licence a where z.speed_li =
ref(a) ;
return y = y + p;
END get_penalty_points;
END;
/
My goal is to sum the values of a tuple that belong to a person ID into P.
but this will return more than one row.
I get this error
select z.get_penalty_points() from licence z
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows ORA-06512: at "OPS$MYID.LICENCE_T", line 5 ORA-06512: at line 1Received on Sun May 23 2004 - 13:54:22 CDT
![]() |
![]() |