如何解决“尝试对不可更新的查询进行更新操作"? [英] how to resolve 'Update operation attempted on non-updatable query'?

查看:41
本文介绍了如何解决“尝试对不可更新的查询进行更新操作"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 sybase-iq 服务器上工作 Sybase IQ/15.4.0.3014

I am working on a sybase-iq server Sybase IQ/15.4.0.3014

我有一个工作查询来更新表的一个字段,如下所示

I have a working query to update one field of a table as below

update  table1
set     a.field1= b.some_value
from    table1 a,
        table2 b
where   a.id = b.id

当我从 sql 会话执行它时,这工作正常.当从高级应用程序调用它时,我收到上述查询的以下错误

This is working fine when I execute it from a sql session. When it is being called from a high level application, I am getting the below error for the above query

SQL 异常代码为 7301
尝试对不可更新的查询进行更新操作

SQL Exception code is 7301
Update operation attempted on non-updatable query

我不知道为什么我会收到这个错误.是否有任何解决方案来修改查询.在互联网上搜索并没有多大帮助.

I am not able to find why I am getting this error. Is there any solution to amend the query. Searching on the internet is not helping much.

有人遇到过这样的问题吗?

Have anyone come across such issue?

推荐答案

您尝试对隐式只读查询执行插入、更新或删除操作.您正在尝试更新系统表或无法以这种方式更改的表.

You attempted an insert, update, or delete operation on a query that is implicitly read-only. You're trying to update system table or table which cannot be changed in that manner.

链接

这篇关于如何解决“尝试对不可更新的查询进行更新操作"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆