You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by st...@gmail.com on 2006/02/07 05:13:24 UTC

how to put parameter in the select item

Dear all,

Now I write one query, it's like this:
 select #family#,partnum from cto.partfamily

I want to pass the parameter "family" to the statement, but it always return
one error(I use DB2 database):
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0418N  A
statement contains a use of a parameter marker that is not valid.
SQLSTATE=42610

Seems the database can't accept the parameter in select item, how can I
finish this function?

Thanks for your warm-heated help!

Steven

RE: how to put parameter in the select item

Posted by Meindert <me...@pastelebusiness.com>.
It’s in the documentation under the chapter for Dynamic Mapped Statements;

Simple Dynamic SQL Elements

IBATIS Datamapper Page 39 (version 2 Jan 25 2005)

 

 

MEINDERT 

From: stevenlou@gmail.com [mailto:stevenlou@gmail.com] 
Sent: 07 February 2006 06:22 AM
To: user-java@ibatis.apache.org; lmeadors@apache.org
Subject: Re: how to put parameter in the select item

 

Dear Larry,

 

It's working, thanks so much, but seems the iBatis document didn't describe
"$" usage.

 

Thanks so much for your warm-heated help.

 

Steven

 

On 2/7/06, Larry Meadors <HYPERLINK
"mailto:lmeadors@apache.org"lmeadors@apache.org> wrote: 

select $family$,partnum from cto.partfamily

Larry


On 2/6/06, HYPERLINK "mailto:stevenlou@gmail.com"stevenlou@gmail.com
<HYPERLINK "mailto:stevenlou@gmail.com"stevenlou@gmail.com> wrote:
> Dear all,
>
> Now I write one query, it's like this:
>  select #family#,partnum from cto.partfamily 
>
> I want to pass the parameter "family" to the statement, but it always
return
> one error(I use DB2 database):
> COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0418N  A
> statement contains a use of a parameter marker that is not valid.
> SQLSTATE=42610
>
> Seems the database can't accept the parameter in select item, how can I
> finish this function?
>
> Thanks for your warm-heated help!
>
> Steven

 

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date: 04/02/2006


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date: 04/02/2006
 

Re: how to put parameter in the select item

Posted by st...@gmail.com.
Dear Larry,

It's working, thanks so much, but seems the iBatis document didn't describe
"$" usage.

Thanks so much for your warm-heated help.

Steven


On 2/7/06, Larry Meadors <lm...@apache.org> wrote:
>
> select $family$,partnum from cto.partfamily
>
> Larry
>
>
> On 2/6/06, stevenlou@gmail.com <st...@gmail.com> wrote:
> > Dear all,
> >
> > Now I write one query, it's like this:
> >  select #family#,partnum from cto.partfamily
> >
> > I want to pass the parameter "family" to the statement, but it always
> return
> > one error(I use DB2 database):
> > COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0418N  A
> > statement contains a use of a parameter marker that is not valid.
> > SQLSTATE=42610
> >
> > Seems the database can't accept the parameter in select item, how can I
> > finish this function?
> >
> > Thanks for your warm-heated help!
> >
> > Steven
>

Re: how to put parameter in the select item

Posted by Larry Meadors <lm...@apache.org>.
select $family$,partnum from cto.partfamily

Larry


On 2/6/06, stevenlou@gmail.com <st...@gmail.com> wrote:
> Dear all,
>
> Now I write one query, it's like this:
>  select #family#,partnum from cto.partfamily
>
> I want to pass the parameter "family" to the statement, but it always return
> one error(I use DB2 database):
> COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0418N  A
> statement contains a use of a parameter marker that is not valid.
> SQLSTATE=42610
>
> Seems the database can't accept the parameter in select item, how can I
> finish this function?
>
> Thanks for your warm-heated help!
>
> Steven