Forum Discussion
CaMiller110
Jul 13, 2023Copper Contributor
SQL Query
Hi all, I have the the table, something like this: ID Business Price 1234 US 6 1234 MX 8 I want the logic that updates the table in this ...
olafhelper
Jul 14, 2023Bronze Contributor
I have the the table, something like this:
CaMiller110 , "something like"? A more precise would be fine. Next time, please post table design as DDL, some sample data as DML statement and the expected result.
Update statement like this?
UPDATE MX
SET Price = US.Price
FROM youTable AS US
INNER JOIN
yourTable AS MX
ON US.ID = MS.ID
WHERE US.Business = 'US'
AND MX.Business = 'MX'