非常着急 请大神速速看看,万分感谢。。
我的sql语句
<update id="updateByPrimaryKeySelective" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="begin" close=";end;" separator=";">
update TSM_CAS_R001
<set >
<if test="item.casNo != null">
cas_no = #{item.casNo,jdbcType=VARCHAR},
</if>
<if test="item.chDic != null">
ch_dic = #{item.chDic,jdbcType=VARCHAR},
</if>
<if test="item.cSeqid != null">
c_seqid = #{item.cSeqid,jdbcType=VARCHAR},
</if>
<if test="item.srNo != null">
sr_no = #{item.srNo,jdbcType=VARCHAR},
</if>
<if test="item.casArbegdtime != null">
cas_arbegdtime = #{item.casArbegdtime,jdbcType=VARCHAR},
</if>
<if test="item.casArenddtime != null">
cas_arenddtime = #{item.casArenddtime,jdbcType=VARCHAR},
</if>
<if test="item.casArintime != null">
cas_arintime = #{item.casArintime,jdbcType=VARCHAR},
</if>
<if test="item.casArouttime != null">
cas_arouttime = #{item.casArouttime,jdbcType=VARCHAR},
</if>
<if test="item.casNcarouttime != null">
cas_ncarouttime = #{item.casNcarouttime,jdbcType=DECIMAL},
</if>
<if test="item.casSmsartime != null">
cas_smsartime = #{item.casSmsartime,jdbcType=VARCHAR},
</if>
<if test="item.casOnldartime != null">
cas_onldartime = #{item.casOnldartime,jdbcType=VARCHAR},
</if>
<if test="item.casCastmp1 != null">
cas_castmp1 = #{item.casCastmp1,jdbcType=DECIMAL},
</if>
<if test="item.casCastmp1time != null">
cas_castmp1time = #{item.casCastmp1time,jdbcType=VARCHAR},
</if>
<if test="item.casCastmp2 != null">
cas_castmp2 = #{item.casCastmp2,jdbcType=DECIMAL},
</if>
<if test="item.casCastmp2time != null">
cas_castmp2time = #{item.casCastmp2time,jdbcType=VARCHAR},
</if>
<if test="item.casCastmp3 != null">
cas_castmp3 = #{item.casCastmp3,jdbcType=DECIMAL},
</if>
<if test="item.casCastmp3time != null">
cas_castmp3time = #{item.casCastmp3time,jdbcType=VARCHAR},
</if>
<if test="item.casArmaxwgt != null">
cas_armaxwgt = #{item.casArmaxwgt,jdbcType=DECIMAL},
</if>
<if test="item.casArminwgt != null">
cas_arminwgt = #{item.casArminwgt,jdbcType=DECIMAL},
</if>
<if test="item.casAravgwgt != null">
cas_aravgwgt = #{item.casAravgwgt,jdbcType=DECIMAL},
</if>
<if test="item.casArmaxpres != null">
cas_armaxpres = #{item.casArmaxpres,jdbcType=DECIMAL},
</if>
<if test="item.casArminpres != null">
cas_arminpres = #{item.casArminpres,jdbcType=DECIMAL},
</if>
<if test="item.casAravgpres != null">
cas_aravgpres = #{item.casAravgpres,jdbcType=DECIMAL},
</if>
<if test="item.casArvtmp != null">
cas_arvtmp = #{item.casArvtmp,jdbcType=DECIMAL},
</if>
<if test="item.casDeptmp != null">
cas_deptmp = #{item.casDeptmp,jdbcType=DECIMAL},
</if>
<if test="item.casQmessage != null">
cas_qmessage = #{item.casQmessage,jdbcType=VARCHAR},
</if>
<if test="item.casQtime != null">
cas_qtime = #{item.casQtime,jdbcType=VARCHAR},
</if>
<if test="item.casTimedf != null">
cas_timedf = #{item.casTimedf,jdbcType=VARCHAR},
</if>
<if test="item.casAttdate != null">
cas_attdate = #{item.casAttdate,jdbcType=VARCHAR},
</if>
<if test="item.casAccdate != null">
cas_accdate = #{item.casAccdate,jdbcType=VARCHAR},
</if>
<if test="item.wkGroup != null">
wk_group = #{item.wkGroup,jdbcType=VARCHAR},
</if>
<if test="item.wkShift != null">
wk_shift = #{item.wkShift,jdbcType=VARCHAR},
</if>
<if test="item.cCreater != null">
c_creater = #{item.cCreater,jdbcType=VARCHAR},
</if>
<if test="item.dCreatedate != null">
d_createdate = #{item.dCreatedate,jdbcType=VARCHAR},
</if>
<if test="item.delFlag != null">
del_flag = #{item.delFlag,jdbcType=VARCHAR},
</if>
<if test="item.cTimestamp != null">
c_timestamp = #{item.cTimestamp,jdbcType=TIMESTAMP},
</if>
<if test="item.cSw01 != null">
c_sw01 = #{item.cSw01,jdbcType=VARCHAR},
</if>
<if test="item.cSw02 != null">
c_sw02 = #{item.cSw02,jdbcType=VARCHAR},
</if>
<if test="item.cSw03 != null">
c_sw03 = #{item.cSw03,jdbcType=VARCHAR},
</if>
<if test="item.cSw04 != null">
c_sw04 = #{item.cSw04,jdbcType=VARCHAR},
</if>
<if test="item.cSw05 != null">
c_sw05 = #{item.cSw05,jdbcType=VARCHAR},
</if>
<if test="item.cSw06 != null">
c_sw06 = #{item.cSw06,jdbcType=VARCHAR},
</if>
<if test="item.cSw07 != null">
c_sw07 = #{item.cSw07,jdbcType=VARCHAR},
</if>
<if test="item.cSw08 != null">
c_sw08 = #{item.cSw08,jdbcType=VARCHAR},
</if>
<if test="item.cSw09 != null">
c_sw09 = #{item.cSw09,jdbcType=VARCHAR},
</if>
<if test="item.cSw10 != null">
c_sw10 = #{item.cSw10,jdbcType=VARCHAR},
</if>
<if test="item.cSw11 != null">
c_sw11 = #{item.cSw11,jdbcType=VARCHAR},
</if>
<if test="item.cSw12 != null">
c_sw12 = #{item.cSw12,jdbcType=VARCHAR},
</if>
<if test="item.cSw13 != null">
c_sw13 = #{item.cSw13,jdbcType=VARCHAR},
</if>
<if test="item.cSw14 != null">
c_sw14 = #{item.cSw14,jdbcType=VARCHAR},
</if>
<if test="item.cSw15 != null">
c_sw15 = #{item.cSw15,jdbcType=VARCHAR},
</if>
<if test="item.cStirstate != null">
c_stirstate = #{item.cStirstate,jdbcType=VARCHAR},
</if>
</set>
where sk_no = #{item.skNo,jdbcType=VARCHAR}
</foreach>
</update>
报的异常如下:
SEVERE: Servlet.service() for servlet [MES] in context with path [/MES] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:
Error updating database. Cause: java.sql.SQLException: ORA-06550: 第 4 行, 第 7 列:
PL/SQL: ORA-00971: 缺失 SET 关键字
ORA-06550: 第 2 行, 第 5 列:
PL/SQL: SQL Statement ignored
ORA-06550: 第 8 行, 第 7 列:
PL/SQL: ORA-00971: 缺失 SET 关键字
ORA-06550: 第 6 行, 第 5 列:
PL/SQL: SQL Statement ignored
The error may involve td.young.smp.sm.bof.dao.TSM_CAS_R001Mapper.updateByPrimaryKeySelective-Inline
The error occurred while setting parameters
SQL: begin update TSM_CAS_R001 where sk_no = ? ; update TSM_CAS_R001 where sk_no = ? ;end;
Cause: java.sql.SQLException: ORA-06550: 第 4 行, 第 7 列:
PL/SQL: ORA-00971: 缺失 SET 关键字
ORA-06550: 第 2 行, 第 5 列:
PL/SQL: SQL Statement ignored
ORA-06550: 第 8 行, 第 7 列:
PL/SQL: ORA-00971: 缺失 SET 关键字
ORA-06550: 第 6 行, 第 5 列:
PL/SQL: SQL Statement ignored
; bad SQL grammar []; nested exception is java.sql.SQLException: ORA-06550: 第 4 行, 第 7 列:
PL/SQL: ORA-00971: 缺失 SET 关键字
ORA-06550: 第 2 行, 第 5 列:
PL/SQL: SQL Statement ignored
ORA-06550: 第 8 行, 第 7 列:
PL/SQL: ORA-00971: 缺失 SET 关键字
ORA-06550: 第 6 行, 第 5 列:
PL/SQL: SQL Statement ignored
] with root cause
java.sql.SQLException: ORA-06550: 第 4 行, 第 7 列:
PL/SQL: ORA-00971: 缺失 SET 关键字
ORA-06550: 第 2 行, 第 5 列:
PL/SQL: SQL Statement ignored
ORA-06550: 第 8 行, 第 7 列:
PL/SQL: ORA-00971: 缺失 SET 关键字
ORA-06550: 第 6 行, 第 5 列:
PL/SQL: SQL Statement ignored
这是怎么回事?请大神看看。。我解决了半天感觉是一点问题没有啊?问什么老是报
这个异常呢?实在是解决不了啊。。。