RE: IN comparison operator in PL/SQL cursor

  • From: "Boyle, Christopher" <Christopher.Boyle@xxxxxxxxxxxxx>
  • To: <gequelch@xxxxxxxx>, "oracle-l" <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 13 Dec 2006 16:14:26 -0500

Tom Kyte's site has several solutions to this depending on the version
of the database.  This is a link for one that will work on 8.1.5 and


-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Geoffrey E. Quelch
Sent: Wednesday, December 13, 2006 3:57 PM
To: oracle-l
Subject: IN comparison operator in PL/SQL cursor

I'm wondering if someone on this list can help with this problem I'm
to resolve.

I'm attempting to use an IN comparison operator in a PL/SQL cursor and
seem to get it to work.

Pseudo code follows:

    PROCEDURE GetStationDataByList (
        in_list     IN VARCHAR2
        -- Retrieval CURSOR
        CURSOR cr_retrieve IS
        SELECT SD.Value AS Value
        FROM Station_Data SD
        WHERE SD.Abbreviation IN (in_list)

(I have removed unrelated items in this cursor.)

As written, the above doesn't work, how can I modify "in_list" to get
this to
work? Is this in fact even possible?

By not work, I mean no rows are returned and I don't get an error. If I
the select statement to sqlplus and place the
text I have in "in_list" into the operator, I get rows returned as

I've consulted the Oracle documentation, and there appears to be no
on how this needs to be done.

Geoff Quelch

Geoff Quelch
Email: gequelch@xxxxxxxx


This email has been scanned by the MessageLabs Email Security System.
For more information please visit 

NOTICE OF CONFIDENTIALITY: Information included in and/or attached to this 
electronic mail transmission may be confidential. This electronic mail 
transmission is intended for the addressee(s) only. Any unauthorized 
disclosure, reproduction, or distribution of, and/or any unauthorized action 
taken in reliance on the information in this electronic mail is prohibited. If 
you believe that you have received this electronic mail transmission in error, 
please notify the sender by reply transmission, or contact 
helpdesk@xxxxxxxxxxxxx, and delete the message without copying or disclosing 

This email has been scanned by the MessageLabs Email Security System.
For more information please visit 

Other related posts: