ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Multiple select queries in one select tag
Date Wed, 03 Aug 2005 21:28:32 GMT
Not that I am aware of....why not just use a union?

Larry


On 3 Aug 2005 21:25:24 -0000, sreenivas <ko_srinivas@rediffmail.com> wrote:
> 
> Hi,
> 
> I would like to know whether or not below approach is possible with 
> iBATIS.
> 
> <select id ="getEmpDetails" parameterClass = "com.abc.Input" resultClass = 
> "com.abc.Output">
> select emp_name as eName, emp_sal as eSal from emp where emp_id = #emp_id# 
> and loc_code=#loc_code#
> 
> select dept_no as eDeptNo from dept where emp_id = #emp_id# and 
> loc_code=#loc_code#
> </select>
> 
> As in the above code, both queries take inputs from same parameter class, 
> and trying to map results too in the same result class.
> 
> I know there are other ways to do that, but would like to know possibility 
> of executing multiple select statements in 1 <select> mapping, and 
> populating results of both the queries into same result object.
> 
> Thanks and regards,
> Sreeni 
> 
> 
>  <http://clients.rediff.com/signature/track_sig.asp>

Mime
View raw message