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 get all the values of a tuple that belong to a person ID into P.
but it 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 1
thanks