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
You have to declare the type on "the database level" as ammoQ suggested:
CREATE TYPE subjectid_tab AS TABLE OF NUMBER INDEX BY binary_integer;
instead of declaring the type within PL/SQL. If you declare the type just in the PL/SQL block, it won't be available to the SQL "engine".