[英]HSQLDB Stored Procedure Error: attempt to assign to non-updatable column
[英]SQL Anywhere Error -728: Update operation attempted on non-updatable remote query
我正在嘗試做的是:
update table_name set field2 = substring(REGEXP_SUBSTR(field1, 'item=[0-9]+', charindex('item=', field1)), 6)
但是我越來越
SQL Anywhere Error -728: Update operation attempted on non-updatable remote query
我能以某種方式解決嗎? 我不使用本地/遠程表。 我用一張桌子。
所以我想我找到了孤獨...甚至2。不幸的是,仍然沒有辦法使用REGEXP_SUBSTR ...我這樣做:
第一
alter table my_table add item_position int null
alter table my_table add is_char int null
alter table my_table add item_part varchar(200) null
alter table my_table add item bigint null
update my_table set item_position = charindex('item=', field1)+5;
update my_table set item_part = substring(field1, item_pos, 10);
update my_table set is_char = charindex('&', clid_part)-1;
update my_table set item = case when is_char = -1 then item_part else substring(item_part, 1, charindex('&', item_part)-1) end;
要么
cast(str_replace(substring(field1, charindex('item=', field1)+5, 10), substring(substring(field1, charindex('item=', field1)+5, 10),
(charindex('&', substring(field1, charindex('clid=', field1)+5, 10)))), '') as integer) as item
像這樣
我建議仔細檢查table_name實際上是一個表,但不是視圖。 如果是視圖,則可以使用sp_helptext命令查看其定義,例如
sp_helptext'view_name'
要么
sp_helptext'schema_name.view_name'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.