Need help with the Merge statement

前端 未结 3 1590
轻奢々
轻奢々 2021-01-13 08:11

I want to update a table called Sorels_ext from a table called Sorels. The link between them is the fkey_id of Sorels_ext equals the identity_column of the Sorels table. Thi

3条回答
  •  粉色の甜心
    2021-01-13 08:38

    INSERT (SORe.fkey_id, SORe.Color) 
    

    should read:

    INSERT (fkey_id, Color) 
    

    Columns in the insert list can only refer to the target table. The parser doesn't expect to see a table alias there, and doesn't know how to resolve it.

    If it sees "column1", it knows it belongs to the target table. It sees "table1.column1", it doesn't know what "table1" means, since "table1" as a token is out of scope.

提交回复
热议问题