<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" 
	"http://www.ibatis.com/dtd/sql-map-2.dtd">
	
<sqlMap namespace="BapBusinessDay">
	<statement id="selectList" resultClass="java.util.HashMap">
		SELECT ROWNO, BASE_DT, LRCL_DT, LPMN_YN, HOLDAY_CD
         FROM ( 
        	SELECT 
        		   @NO := @NO + 1 AS ROWNO,
        		   BASE_DT, LRCL_DT, LPMN_YN, HOLDAY_CD
        	FROM (  
              SELECT 
					BASE_DT, 
					LRCL_DT, 
					LPMN_YN, 
					HOLDAY_CD
              FROM $schemaId$.TSEAIBE03
		    <dynamic prepend="WHERE">
			    <isNotEmpty prepend="AND" property="likeBaseDT">
					BASE_DT LIKE #likeBaseDT#
				</isNotEmpty>  
			</dynamic> 
			) TMP,  (SELECT @NO := 0) R
			ORDER BY BASE_DT DESC
		) T
	 	WHERE ROWNO BETWEEN #startNum# AND #endNum#
	</statement>
</sqlMap>