我正在尝试从 DB2 数据库中的 CLOB 字段中删除最后 10 个字符。我可以这样做:
UPDATE report
SET comment = LEFT(comment, (LENGTH(comment) - 10))
但是,我想根据报告是否在当前报告期间将截断限制为行的子集。我试过这个...
UPDATE report
SET comment =
( SELECT LEFT(comment, (LENGTH(comment) - 10))
FROM report
INNER JOIN report_period
ON report.report_period_id = report_period.report_period_id
WHERE report_period.name = '2013 Interim Report' )
...但我明白了
The result of a scalar fullselect, SELECT INTO statement, or
VALUES INTO statement is more than one row
我究竟做错了什么?