クエリのselectKey問題{{くえりのselectKeyもんだい}}

738 ワード

select ORGNAME from paOrganization where roleId=#roleName# and parentId in (  select top 1 orgId from paOrganization where roleId=#roleName# and orgUrl=#orgUrl#) and isComp=#isComp#

通常
==========
出場する
<select id="getComBtn" resultClass="String" parameterClass="java.util.Map">
  <selectKey keyProperty="parentId" resultClass="String" >
       select top 1 orgId from paOrganization where roleId=#roleName# and orgUrl=#orgUrl#
  </selectKey>
    select ORGNAME from paOrganization where roleId=#roleName# and parentId=#parentId# and isComp=#isComp#

</select>