ibatis mybatis sql语句配置 符号不兼容 大于号 小于号
2013-12-09 11:02
295 查看
因为这个是xml格式的,所以不允许出现类似“>”这样的字符,但是都可以使用<![CDATA[ ]]>符号进行说明,将此类符号不进行解析
你的可以写成这个:
mapper文件示例代码<![CDATA[ when min(starttime)<='12:00' and max(endtime)<='12:00' ]]> < <
> >
<> <>
& &
' '
" "
实例:
select to_date(to_char(tf.created_time,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') from t_ff_rt_workitem tf
where to_date(to_char(tf.created_time,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss')<=to_date(to_char('2012-05-19','yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss')
错误:ORA-01722:无效数字
select to_date(to_char(tf.created_time,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') from t_ff_rt_workitem tf
where to_date(to_char(tf.created_time,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss')<=to_date('2012-05-19','yyyy-mm-dd hh24:mi:ss')
复制的文章地址为:http://hi.baidu.com/cl770511/item/d8c5e603cdc9de1dcc34ea97
你的可以写成这个:
mapper文件示例代码<![CDATA[ when min(starttime)<='12:00' and max(endtime)<='12:00' ]]> < <
> >
<> <>
& &
' '
" "
实例:
select to_date(to_char(tf.created_time,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') from t_ff_rt_workitem tf
where to_date(to_char(tf.created_time,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss')<=to_date(to_char('2012-05-19','yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss')
错误:ORA-01722:无效数字
select to_date(to_char(tf.created_time,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') from t_ff_rt_workitem tf
where to_date(to_char(tf.created_time,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss')<=to_date('2012-05-19','yyyy-mm-dd hh24:mi:ss')
复制的文章地址为:http://hi.baidu.com/cl770511/item/d8c5e603cdc9de1dcc34ea97
相关文章推荐
- ibatis mybatis sql语句配置 符号不兼容 大于号 小于号
- ibatis mybatis sql语句配置 符号不兼容 大于号 小于号<!CDATA[ ]>
- ibatis mybatis sql语句配置 符号不兼容 大于号 小于号
- ibatis mybatis sql语句配置 符号不兼容 大于号 小于号
- ibatis mybatis sql语句配置 符号不兼容 大于号 小于号
- ibatis mybatis sql语句配置 符号不兼容 大于号 小于号
- ibatis mybatis sql语句配置 符号不兼容 大于号 小于号
- ibatis mybatis sql语句配置 符号不兼容 大于号 小于号<!CDATA[ ]>
- ibatis mybatis sql语句配置 符号不兼容 大于号 小于号<!CDATA[ ]>
- MyBatis 和 ibatis的动态SQL语句配置符号,不兼容大于号、小于号等特殊符号问题 X
- MyBatis 和 ibatis的动态SQL语句配置符号,不兼容大于号、小于号等特殊符号问题
- MyBatis SQL语句 符号不兼容 大于号 小于号 (XML转义字符)
- IBatis的Mapper配置文件中使用大于号好小于号 :>和<
- Mybatis IBatis的Mapper配置文件中使用大于号好小于号 :>和<
- ibatis中SQL映射配置文件中动态SQL语句语法
- 通过xml处理sql语句时对小于号与大于号的处理转换
- ibatis运行的SQL语句的输出——通过配置log4j
- spring struts2 ibatis 配置log4j不打印sql语句
- 当ibatis 包含大于小于号的sql语句
- ibatis配置log4j输出sql语句等日志信息