在 OrientDB 中更新值设置一个类似值的数组
Updating value in OrientDB set an array like value
我尝试运行以下命令:
UPDATE EN190
set Sys_DisplayTitle = (SELECT EP190_1 FROM EN190 WHERE Sys_ID = 4705)
WHERE Sys_ID = 4706
(SELECT EP190_1 FROM EN190 WHERE Sys_ID = 4705) 的值是一个字符串:
SomeValue
那是我期望的 (SELECT EP190_1 FROM EN190 WHERE Sys_ID = 4706)
但此字段中的值现在是以下字符串:
[SomeValue]
我该如何解决这个问题?
下面的查询SELECT EP190_1 FROM EN190 WHERE Sys_ID = 4705
return 列表不是字符串
不是真正的 "clean" 解决方案,但它有效。
UPDATE EN190 set Sys_DisplayTitle = (SELECT EP190_1 FROM EN190 WHERE Sys_ID = 4705),
Sys_DisplayTitle= Sys_DisplayTitle.replace("[","").replace("]","")
WHERE Sys_ID = 4706
(见)
我尝试运行以下命令:
UPDATE EN190
set Sys_DisplayTitle = (SELECT EP190_1 FROM EN190 WHERE Sys_ID = 4705)
WHERE Sys_ID = 4706
(SELECT EP190_1 FROM EN190 WHERE Sys_ID = 4705) 的值是一个字符串:
SomeValue
那是我期望的 (SELECT EP190_1 FROM EN190 WHERE Sys_ID = 4706)
但此字段中的值现在是以下字符串:
[SomeValue]
我该如何解决这个问题?
下面的查询SELECT EP190_1 FROM EN190 WHERE Sys_ID = 4705
return 列表不是字符串
不是真正的 "clean" 解决方案,但它有效。
UPDATE EN190 set Sys_DisplayTitle = (SELECT EP190_1 FROM EN190 WHERE Sys_ID = 4705),
Sys_DisplayTitle= Sys_DisplayTitle.replace("[","").replace("]","")
WHERE Sys_ID = 4706
(见