Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL IN parameter
barkerd2_at_my-dejanews.com wrote:
> I am trying to pass an IN list to a PL/SQL procedure and when I compile the
> procedure I get the error :PLS-00382: expression is of wrong type. Below is a
> sample of the PL/SQL procedure.
>
> CREATE OR REPLACE PROCEDURE my_proc(
> results IN OUT db_cursor_types.actbudsb,
> year_list IN VARCHAR2) AS
> BEGIN
> OPEN results FOR
> SELECT fields from my_table
> WHERE year IN year_list
> ...
>
> If I change 'WHERE year IN year_list' to 'WHERE year = year_list' then
> everything works fine. Is there a anyway of passing in an IN list to a stored
> procedure?
>
"IN" in the procedure declaration has nothing to do with lists! It only designates INput variables. So "year IN year_list" makes no sense, because both variables are of type VARCHAR2, and no lists. Therefore the comparison with "=" works just fine. Received on Tue Jul 14 1998 - 05:48:18 CDT
![]() |
![]() |