[img]http://dl.iteye.com/upload/attachment/0064/3440/6a0db10d-6bfa-30cb-b132-b58467fd4462.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/0064/3437/8e49b512-75df-36d7-b701-2afeb4452a3b.jpg[/img]
只求动态插叙的SQL语句 在Ibatis中执行 谢谢 :oops:
<!--here is your dynamic condition-->
CLIENT_ID = #client:VARCHAR#
NAME like '%'||#name#||'%'
<!--其他字段-->
<select id="queryList" resultMap="java.util.hashmap" parameterClass="map">
SELECT * FROM (select 客户,订单,货号等等字段 from table1)
<dynamic prepend="WHERE ">
<include refid="dynamic_where_query"/>
</dynamic>
</select>
具体字段和表名看你自己的需要了 反正就是先查出上面的数据集合 作为下面查询的基础数据,加上条件值
我是这样理解你的问题的
最好把问题抽象出来,简化之后再提问,效果会好些