Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL IN parameter

Re: PL/SQL IN parameter

From: Martin Bobrovsky <Martin.Bobrovsky_at_workforce.co.at>
Date: Tue, 14 Jul 1998 12:48:18 +0200
Message-ID: <35AB3772.1D4823D6@workforce.co.at>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US