merge语句错误:parseexception:外部输入

gudnpqoy  于 2021-08-09  发布在  Java
关注(0)|答案(1)|浏览(349)

在databricks中使用merge语句时出现以下错误:

MERGE INTO t1
 USING
  t2
 ON
  t1.[c1] = t2.[c1]
 AND
  t1.[c2] <> t2.[c2]
 WHEN MATCHED THEN UPDATE
 SET   t1.[c1] = t2.[c2]

错误:
sql语句中出错:parseexception:外部输入
你能帮个忙吗?

vlf7wbxs

vlf7wbxs1#

MERGE database.schema.tablename as t1 
USING <the Query you want to run or the database.schema.tablename>  as t2 
ON (t1.[c1] = t2.[c1] AND t1.[c2] != t2.[c2])
WHEN MATCHED THEN UPDATE SET t1.[c1] = t2.[c2]

试试上面的建议

相关问题