错误:编译语句时出错:失败:ParseException行1:9与输入'from'不匹配,期望SET在更新语句中靠近'a'

时间:2019-07-07 10:11:09

标签: sql hadoop hive hiveql

  

我尝试更新表1而不设置表属性,并且我已经   收到以下错误“预期来自SET的输入不匹配”   '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;

0 个答案:

没有答案