有关于sql.xml中的东西
1.<dynamic prepend="where">后必须得加条件 如果为空的话它就会报错 如果没有什么条件可写的话 就加上rownum>0 或1=1
2.<isNotEmpty property="ENTRANCEDATESTART"></isNotEmpty>中的字段名得和这个变量名>#ENTRANCEDATESTART#名字相同
<dynamic prepend="where">
rownum>0
<isNotEmpty property="NAME">
AND S.NAME like '%' || #NAME# || '%'
</isNotEmpty>
<isNotEmpty property="SEX">
AND S.SEX=#SEX#
</isNotEmpty>
<isNotEmpty property="PEOPLE">
AND S.PEOPLE like '%' || #PEOPLE# || '%'
</isNotEmpty>
<isNotEmpty property="SCHOOLPROFESSIONAL">
AND S.SCHOOLPROFESSIONAL like '%' || #SCHOOLPROFESSIONAL# || '%'
</isNotEmpty>
<isNotEmpty property="LEARNYEAR">
AND S.LEARNYEAR like '%' || #LEARNYEAR# || '%'
</isNotEmpty>
<isNotEmpty property="PROVINCE">
AND S.PROVINCE like '%' || #PROVINCE# || '%'
</isNotEmpty>
<isNotEmpty property="REGPERRES">
AND S.REGPERRES like '%' || #REGPERRES# || '%'
</isNotEmpty>
<isNotEmpty property="AREA">
AND S.AREA like '%' || #AREA# || '%'
</isNotEmpty>
<isNotEmpty property="MIDDLESCHOLL">
AND S.MIDDLESCHOLL like '%' || #MIDDLESCHOLL# || '%'
</isNotEmpty>
<isNotEmpty property="ISPAY">
AND S.ISPAY like '%' || #ISPAY# || '%'
</isNotEmpty>
<isNotEmpty property="ENTRANCEDATESTART">
AND S.ENTRANCEDATE >#ENTRANCEDATESTART#
</isNotEmpty>
<isNotEmpty property="ENTRANCEDATEEND">
AND S.ENTRANCEDATE <![CDATA[<]]> #ENTRANCEDATEEND#
</isNotEmpty>
<isNotEmpty property="OPENYEAR">
AND S.OPENYEAR like '%' || #OPENYEAR# || '%'
</isNotEmpty>
<isEmpty property="OPENYEAR">
AND S.OPENYEAR =(SELECT to_CHAR(SYSDATE,'YYYY') FROM DUAL)
</isEmpty>
</dynamic>