populating null rows in table column based on matching IDs via join or otherwise
Hi all, quick question about updating a final table - i hope what i'm asking is clear.
Let's say i have two tables: Table A and Table B. Let's also say that Table A is my final/master table used for data vis within Tableau (or something akin), and that Table B feeds certain columns into Table A based on matches within a tertiary table, Table C (which is not relevant to this conversation).
As is, Table A has columns:
As is, Table B has columns:
What I would like to do is update Table A's CustomerName column to equal CustomerCode in Table B where the columns of total_cost_dollars equal each other across tables.
I've run this left join query to ensure that, when I do update Table A's CustomerName to equal CustomerCode, the total cost columns are exact/true matches for my entire data set.
B.total_cost_dollars = A.total_cost_dollars
A.CustomerName IS NULL;
Any quick help is much appreciated.
Thanks so much!