Oralce查询后修改数据,弹窗报提示these query result are not updateable,include the ROWID to get updateable...

 

 

select t.*,
       (select a.ANNEXNAME from base_annex a where a.id = t.closeFile) closeFileName,
       (select a.ANNEXNAME from base_annex a where a.id = t.auditFile) auditFileName,
       (select u.userText from sy_user u where u.userCode = t.creator) applierText
  from tablename t
 WHERE dataFlag = 1
   and t.problemId = '25076'
   and rownum = 1

执行上面的查询报 java.sql.SQLException: ORA-01722: 无效数字,因为子查询有根据id判断的条件

where a.id = t.auditFile

子查询里有个数字型字符串插入错了,auditFile应该是个数字字符串,但是插入错了,插入了字符串4679!''到数据库,!''是freemarker判断非空的,前台模板就写错了。

最后把模板里面改了下,后台数据库想要继续用这条数据,于是想修改这条数据,

修改的时候,弹窗报提示these query result are not updateable,include the ROWID to get updateable

根据提示查询加rowid,如下:

select t.*,t.rowid from tablename t
WHERE dataFlag = 1 and t.problemId = '25076'
and rownum = 1

 

转载于:https://www.cnblogs.com/wozixiaoyao/p/7519323.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值