mybatis配置问题

垂垂 发布于 2013/08/05 11:45
阅读 1K+
收藏 0
<select id="searchAnnounce" parameterType="java.util.Map" resultType="CompanyAnnouncement">
 		<choose>
	 		<when test="star_num != null and end_num != null">
	 			SELECT * FROM ( 
	 				SELECT tb.*, ROWNUM RN FROM (
		 				select
		 				<include refid="announcementTableFields" />
		 				from company_announcement where (1=1) and ${_parameter} order by settop desc,creat_dt desc
	 				) tb 
	 			) WHERE RN BETWEEN #{star_num} and #{end_num}
	 		</when>
	 		<otherwise>
	 			select
		 		<include refid="announcementTableFields" />
		 		from company_announcement where (1=1) and ${_parameter} order by settop desc,creat_dt desc
	 		</otherwise>
 		</choose>
 	</select>
### Error querying database.  Cause: java.sql.SQLException: 出现不支持的 SQL92 标记: 195: end_num
### The error may involve com.topchoice.smartcompany.dao.impl.AnnounceMentMapper.searchAnnounce-Inline
### The error occurred while setting parameters
### Cause: java.sql.SQLException: 出现不支持的 SQL92 标记: 195: end_num
; uncategorized SQLException for SQL []; SQL state [null]; error code [17034]; 出现不支持的 SQL92 标记: 195: end_num; nested exception is java.sql.SQLException: 出现不支持的 SQL92 标记: 195: end_num
加载中
0
F_L_F
F_L_F
应该是sql语句出问题了吧,通过日志把执行的sql打出来,然后拿出来执行SQL看看!
返回顶部
顶部