Merge /*+ parallel (16)*/ into psx_cluster_audit_t_1 a
using psx_cluster_cross_ref_t_1 b
on (
a.psx_id=b.RECORD_ID
and a.PSX_BATCH_ID=b.PSX_BATCH_ID
and b.psx_batch_id='2411121519014999'
)
when matched then update set mpc_new=b.mpc where a.mpc_new is null
以上查询给出:
SQL 错误 [42601]:错误:“where”处或附近的语法错误 位置:postgresql 中的 234 错误
我尝试使用其他子句,例如 ON
MERGE /*+ parallel (16)*/ INTO psx_cluster_audit_t_1 a
USING psx_cluster_cross_ref_t_1 b
ON (
a.psx_id = b.RECORD_ID
AND a.PSX_BATCH_ID = b.PSX_BATCH_ID
AND b.psx_batch_id = '2411121519014999'
)
WHEN MATCHED THEN
UPDATE SET a.mpc_new = b.mpc
WHERE a.mpc_new IS NULL;
试试这个