Search code examples
kinetica

What is the proper update syntax for Kinetica?


I'm using Kinetica 7.0.20.3, I need to update field F1 from table A using field F2 from table B, table A and B both can join on the key column, I tried update statement below, but didn't work.

update Table1 A, Table2 B 
set A.F1 = B.F2 
where A.pk = B.pk

Thanks for your help!


Solution

  • The syntax is:

    UPDATE A
    SET    A.F1 = B.F2
    FROM   Table1 A
    JOIN   Table2 B
    ON     A.pk = B.pk
    ;
    

    or

    UPDATE A
    SET    A.F1 = B.F2
    FROM   Table1 A, Table2 B
    WHERE  A.pk = B.pk
    ;