here\'s the stored procedure i wrote.In this proc \"p_subjectid\" is an array of numbers passed from the front end.
PROCEDURE getsubjects(p_subjectid subject
This is the good solution. You cannot use a table(cast()) if the type that you cast is in the DECLARE part of the pl/sql block. You REALLY need to use CREATE TYPE my_type [...]. Otherwise, it will throw the "cannot fetch row[...]" exception.