T-SQL UPDATE query to fill NULL columns
How about:
UPDATE o
SET parentOrderID = q.parentOrderID
FROM dbo.Orders o
INNER JOIN Quotes q ON o.OrdersID = q.OrderID
WHERE o.parentOrderID IS NULL
AND q.parentOrderID IS NOT NULL
How about:
UPDATE o
SET parentOrderID = q.parentOrderID
FROM dbo.Orders o
INNER JOIN Quotes q ON o.OrdersID = q.OrderID
WHERE o.parentOrderID IS NULL
AND q.parentOrderID IS NOT NULL