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
I believe you have to alias your your source data like so:
USING (select SOR.identity_column,
CASE WHEN left(SOR.FPARTNO, 2) = 'BL'
THEN 'Blue'
WHEN left(SOR.FPARTNO, 2) = 'RD'
THEN 'Red'
ELSE 'White'
END from Sorels AS SOR) **AS SOR** ON (SORe.fkey_id = SOR.identity_column)