<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="BapCron">

	<statement id="selectList" resultClass="java.util.HashMap">
		SELECT @NO := @NO + 1 AS ROWNO
					 , SCHEDID AS "SCHEDID"
					 , CRONEXP AS "CRONEXP"
		     		 , JOBCLASSNAME AS "JOBCLASSNAME"
		    		 , SCHEDDSTCD AS "SCHEDDSTCD"
		    		 , SCANDIRNAME AS "SCANDIRNAME"
		    		 , TIMERMSG AS "TIMERMSG"
		FROM (
				SELECT @NO := @NO + 1 AS ROWNO
					 , SCHEDID
					 , CRONEXP
					 , JOBCLASSNAME
					 , SCHEDDSTCD
					 , SCANDIRNAME
					 , TIMERMSG
				FROM $schemaId$.TSEAIBS06,  (SELECT @NO := 0) R
			<dynamic prepend="WHERE">
				<isNotEmpty prepend="AND" property="searchSchedId">
					SCHEDID LIKE UPPER('%' || #searchSchedId# || '%')
				</isNotEmpty>
			</dynamic>
			) ORGTABLE
		WHERE ROWNO BETWEEN #startNum# AND #endNum#
	</statement>
	
	<statement id="selectListCount" resultClass="java.lang.Integer">
		SELECT 	COUNT(*) AS "TOTALCOUNT"
			FROM $schemaId$.TSEAIBS06
			<dynamic prepend="WHERE">
				<isNotEmpty prepend="AND" property="searchSchedId">
					SCHEDID LIKE UPPER('%' || #searchSchedId# || '%')
				</isNotEmpty>
			</dynamic>
	</statement>	
	
</sqlMap>
