ASKER
Update x
SET
x.Order = y.NewOrderNo
FROM Orders o
INNER JOIN OrdersUpdate y
ON o.Order = y.Order
AND o.M1 = y.M1
AND o.M2 = y.M2
AND o.[Date] = y.[Date]
ASKER
Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.
TRUSTED BY
ASKER
lcohan: I agree. My scenario is a bit contrived as I wanted to get the intent across without using actual tables/data. I would need to use more than just the order as there are multiple M1s and M2s attached to each order and I have to update the correct one with the new order number (see order 12345 above).
Many thanks to both of you. I will give this a shot and report back.