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>