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 Ashish Kulkarni <ku...@yahoo.com> on 2005/07/12 00:23:59 UTC
how to define multiple input parameters in select statement
Hello
If my sql statement is "select * from abc where a = ?"
then i define in my xml file as below
<select id="getPOData" resultClass="DataBean"
parameterClass="java.math.BigDecimal">
SELECT * from abc where a = #value#>
</select>
In my java program i do
List list = sqlMap.queryForList("getPOData",
bigDecimal);
Q1 If i have multiple parameters in select statement
how do i define,
for example my sql statement will be
select * from abc where a =? and b =? and c=?
Ashish
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: how to define multiple input parameters in select statement
Posted by Larry Meadors <la...@gmail.com>.
Start by glancing at the docs, then come back if you still have questions.
Larry
On 7/11/05, Ashish Kulkarni <ku...@yahoo.com> wrote:
> Hello
> If my sql statement is "select * from abc where a = ?"
> then i define in my xml file as below
> <select id="getPOData" resultClass="DataBean"
> parameterClass="java.math.BigDecimal">
> SELECT * from abc where a = #value#>
> </select>
> In my java program i do
> List list = sqlMap.queryForList("getPOData",
> bigDecimal);
>
> Q1 If i have multiple parameters in select statement
> how do i define,
> for example my sql statement will be
> select * from abc where a =? and b =? and c=?
>
> Ashish
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>