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: Help : PL/SQL Cursor Limitations

Re: Help : PL/SQL Cursor Limitations

From: Manivannan <Manivannan.Paramasivam_at_Singapore.Sun.com>
Date: 1997/07/23
Message-ID: <33D5C41C.7723@Singapore.Sun.com>#1/1

Venu Ellendula wrote:
>
> /* Cursor Declaration */
>
> Cursor Employee is
> select Emp_Name
> from Employee
> where Emp_id in (:global.string);
>
> /* Explanation */
>
> :global.string := '12,23,54,65' ;
>
> I am trying to use IN operator to compare
> Emp_id against a set of values. This query Treates the set
> (:global.string)
> as a single value and returns nothing.
> If I initialize :global.string := '12' then the query runs fine.
>
> What's the Problem with this Cursor Declaration ?
> by the way I am working in Forms 4.5
>
> Thanks in advance.

Use of substr function will help here. ie.

where Emp_id in (substr(:global.string,1,2),substr(:global.string,3,2) ...)

will work. But the assumption is you will be passing values of fixed range ie. in two digits or in three digits etc.

Bye and Good Luck

P.Manivannan Received on Wed Jul 23 1997 - 00:00:00 CDT

Original text of this message

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