错误:编译语句时出错:失败:parseexception行1:9不匹配的输入“from”,update语句中应在“a”附近设置

c3frrgcw  于 2021-05-29  发布在  Hadoop
关注(0)|答案(0)|浏览(346)

我试图更新表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;

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题