I want to compare a column in table a and table b
If the a value from table a can be found in table b then I want to update another column in table a with a ‘yes’ and if it cannot be found I want to say ‘no’. This is what I have so far:
UPDATE a
set
[CCA Match Org] = CASE WHEN b.[serial] = a.[CSI] THEN 'yes' ELSE 'no' END
My error at the moment says:
The column prefix ‘b’ does not match with a table name or alias name used in the query.
Assuming the join is on
b.[serial] = a.[CSI]: