PL/SQL Cursors and Parameters

From: <dennishancy_at_eaton.com>
Date: Wed, 31 Jan 2001 15:45:54 GMT
Message-ID: <959bve$fp0$1_at_nnrp1.deja.com>


[Quoted] In my PL/SQL procedure, I have a varchar2 variable called orgList, and populate it with a string that looks like the following:

('0789','1132,'1126','1131')

Later, I pass orgList to a cursor as a parameter. My intent is to do something like the following:

cursor someCursor(orgList varchar2) is
  select someField
    from someTable
   where organization in orgList;

Also have a line like this declared:

someVariable someCursor%ROWTYPE;

When I compile this, I get this list of errors:

PLS-00103: Encountered the symbol "ORGLIST" when expecting one of the following: (

(-- referring to the line "where organization in orgList --)

PLS-00103: Encountered the symbol SOMEVARIABLE

(-- referrring to the line someVariable someCursor%ROWTYPE --)

Any idea what I'm doing wrong? Is there a better solution? Thanks.

Dennis Hancy
Eaton Corporation
Cleveland, OH

Sent via Deja.com
http://www.deja.com/ Received on Wed Jan 31 2001 - 16:45:54 CET

Original text of this message