TSQL: Prevent Nulls update over existing data <p>I have 2 tables:</p> <ol> <li><p>Orders (Table I update and want keep existing data, and prevent overwriting with nulls)</p></li> <li><p>WRK_Table (This table is identical to <em>Orders</em> but can not guarantee all columns will have data when running update)</p></li> </ol> <p>PK column 'Master_Ordernum' There are many columns in the tables, the WRK_Table will have the PK, but data in other columns can not be counted on.</p> <p>I want the WRK_Table to update Orders only with actual data and not Nulls. I was thinking along this line:</p> <pre><code>UPDATE [Orders] SET [Status] = CASE WHEN S.[Status] IS NOT NULL THEN S.[Status] END FROM [WRK_TABLE] S WHERE [Orders].[Master_Ordernum] = S.[Master_Ordernum] </code></pre> <p>The existing data in Orders is being updated with nulls</p>