DELETE amt
FROM $citables.CI_INBOUND_INVOICE_AMT amt
, $citemp.invoice_combine ic
WHERE amt.ci_inb_inv_id = ic.TSR_EDI_INV_REF;
这是Teradata代码,需要转换为PostgreSQL。我收到错误消息
ERROR: syntax error at or near "amt"
LINE 1: DELETE amt
即使内部联接也不起作用。
答案 0 :(得分:0)
也许您可以尝试:
DELETE
FROM $citables.CI_INBOUND_INVOICE_AMT amt
WHERE EXISTS (
SELECT 1
FROM $citemp.invoice_combine ic
WHERE amt.ci_inb_inv_id = ic.TSR_EDI_INV_REF
);