Code:
UPDATE ProductVariant
SET Length = (SELECT Table1.Length
FROM Table1
WHERE ProductVariant.Sku = Table1.Sku)
I keep getting this NULL error code but cant figure it out. There are no nulls in Table1 is there something I should add to the code to make this work? Thank you.
Msg 515, Level 16, State 2, Line 1
Cannot insert the value NULL into column 'Length', table 'database.dbo.ProductVariant'; column does not allow nulls. UPDATE fails.
The statement has been terminated