标签:判断 get common rom nbsp sel start 交集 tcl
排除本身
<select id="getdata" parameterClass="map" resultClass="hmap">
SELECT
TO_CHAR(XRGFN_START,‘yyyy-mm-dd‘) XRGFN_START, TO_CHAR(XRGFN_EXPIRE,‘yyyy-mm-dd‘) XRGFN_EXPIRE
FROM XRGFN_MSTR where 1=1
and UPPER(XRGFN_PART)=UPPER(#XRGFN_PART#)
and (
<![CDATA[ (TO_CHAR(nvl(XRGFN_START, sysdate), ‘yyyy-mm-dd‘) <= UPPER(#XRGFN_START#)
and TO_CHAR(nvl(XRGFN_EXPIRE, sysdate), ‘yyyy-mm-dd‘) >= UPPER(#XRGFN_START#))
or (TO_CHAR(nvl(XRGFN_START, sysdate), ‘yyyy-mm-dd‘) <= UPPER(#XRGFN_EXPIRE#)
and TO_CHAR(nvl(XRGFN_EXPIRE, sysdate), ‘yyyy-mm-dd‘) >= UPPER(#XRGFN_EXPIRE#))
or (TO_CHAR(nvl(XRGFN_START, sysdate), ‘yyyy-mm-dd‘) >= UPPER(#XRGFN_START#)
and TO_CHAR(nvl(XRGFN_EXPIRE, sysdate), ‘yyyy-mm-dd‘) <= UPPER(#XRGFN_EXPIRE#))
]]>
)
<isNotEmpty property="XRGFN_SEQ">
<![CDATA[ and XRGFN_SEQ <> #XRGFN_SEQ# ]]>
</isNotEmpty>
and upper(XRGFN_DOMAIN)=<include refid="common.getUserDomain"/>
</select>
标签:判断 get common rom nbsp sel start 交集 tcl
原文地址:http://www.cnblogs.com/yangpeng-jingjing/p/7363877.html