灯火互联
管理员
管理员
  • 注册日期2011-07-27
  • 发帖数41778
  • QQ
  • 火币41290枚
  • 粉丝1086
  • 关注100
  • 终身成就奖
  • 最爱沙发
  • 忠实会员
  • 灌水天才奖
  • 贴图大师奖
  • 原创先锋奖
  • 特殊贡献奖
  • 宣传大使奖
  • 优秀斑竹奖
  • 社区明星
阅读:3282回复:0

ibatis + spring框架下,对CLOB字段操作

楼主#
更多 发布于:2012-09-25 14:34

ibatis  + spring框架下,对CLOB字段操作。





TfBTradeinterSend.xml设置:


<?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="TfBTradeInterSend">
<typeAlias alias="TfBTradeInterSend" type="com.sitech.groupcust.common.dto.TfBTradeInterSend"/>

<resultMap id="TfBTradeInterSendResult" class="TfBTradeInterSend">
 <result property="tradeId" column="TRADE_ID"/>
 <result property="subscribeId" column="SUBSCRIBE_ID"/>
 <result property="infaceType" column="INFACE_TYPE"/>
 <result property="dealState" column="DEAL_STATE"/>
 <result property="dealMsg" column="DEAL_MSG"/>
 <result property="resendCount" column="RESEND_COUNT"/>
 <result property="sendContent" column="SEND_CONTENT" javaType="java.lang.String" jdbcType="CLOB"/>
 <result property="dealDate" column="DEAL_DATE"/>
 <result property="inDate" column="IN_DATE"/>
 <result property="notes" column="NOTES"/>
 <result property="provinceCode" column="PROVINCE_CODE"/>
  </resultMap>



t.send_content:  类型是CLOB。





问题描述:根据上面sqlMapClient设置后,当对send_content进行插入、更新操作时,没问题。但是当以send_content:作为查询条件时,报下面的错误:


ORA-00932: inconsistent datatypes





解决:


select * from tf_b_trade_inter_send t where


dbms_lob.instr(t.send_content,'02BBSS000100001348479247031914',1,1)>0



喜欢0 评分0
游客

返回顶部