尝试将一行从一个表更新到另一个表

时间:2017-03-31 12:38:41

标签: sql teradata

UPDATE customer_service.batch_status.cust_nm
SET batch_status.cust_nm
SELECT customer_service.batch_detail.cust_nm 
FROM   customer_service.batch_detail 
LEFT JOIN customer_service.batch_status 
    ON customer_service.batch_detail.cust_nm = customer_service.batch_status.cust_nm;

1 个答案:

答案 0 :(得分:0)

您的语法已关闭。

相反:

UPDATE customer_service.batch_status.cust_nm
FROM customer_service.batch_detail csbd
SET cust_nm = csbd.cust_nm
WHERE csbd.cust_nm = customer_service.batch_status.cust_nm;