我试图更新表1,但没有设置表属性,因此出现了以下错误:“mismatched input”from'expecting set near'a'”
UPDATE a from table1 a ,(SELECT
DISTINCT SUBS SUB,
Min(LINE) Over(PARTITION BY CONTRACT) LINE
FROM
table1 K
INNER JOIN
(
SELECT
CUSTOMER,
FROM,
TO,
CONTRACT
FROM
Number_Change a
JOIN
CONTRACTS b ON a.CONTRACT=b.ID
) CH_SUB
ON K.CUSTOMER = CH_SUB.CUSTOMER where (SUBO = Substr(FROM,4) OR SUBO = Substr(TO,4))
)SRC
set a.LINE = SRC.LINE, TEC_UPDATE_DTTM = Current_Timestamp
WHERE SUBS = SUB;
暂无答案!
目前还没有任何答案,快来回答吧!