ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bala R K" <kbas...@gmail.com>
Subject Re: Passing Values to IN Operator in Oracle Stored Procedure
Date Tue, 20 Jun 2006 00:46:11 GMT
Hi,
I want to pass this COUNTRY_ID list to a stored procedure. Would like to
know how to use dynamic tag with procedure tag.

regards,
Bala

On 6/19/06, Debasish Dutta Roy <debasish.duttaroy@gmail.com> wrote:
>
> Hi you have to use dynamic tag. Here is an example
>
>         <dynamic prepend="WHERE">
>             <iterate open="COUNTRY_ID IN(" close=")" conjunction=",">
>                 #[]#
>             </iterate>
>         </dynamic>
>
> From java code all your country ids are in a java.util.List object.
>
>
>
> On 6/19/06, Bala R K <kbase04@gmail.com> wrote:
> >
> >  Hi,
> > I am using Java, Oracle 9i and iBatis 2.1.7 in my application.
> > I like to know how to pass values to a IN Operator for a Stored
> > Procedure.
> >
> > The query will be some what simalar like this:
> >
> > select COUNTRY_NAME,REGION from countries where COUNTRY_ID
> > IN('AR','IN');
> >
> > The values for IN operator (String within single quote and comma
> > separated)i.e. 'AR','IN' need to be passed from the client.
> >
> > Thanks,
> >  Bala
> >
>
>

Mime
View raw message