title: How to make " " values in SQL Server empty/null instead (many columns)?
body: <p>I have a table with some 150 columns, and I haven't the faintest clue how to remove these <code>" "</code> values. I've seen some solutions for single columns, but since I have so many I would like a solution that does it for every column... not sure if that's possible?</p>
  
  <p>I tried: </p>
  
  <pre><code>USE master
  
  UPDATE [master].[dbo].[csvimport] 
  SET value = NULL 
  WHERE value = " "
  </code></pre>
  
  <p>From what I found researching, but it tells me: </p>
  
  <blockquote>
    <p>Msg 207, Level 16, State 1, Line 2<br>
    Invalid column name 'value'.</p>
    
    <p>Msg 207, Level 16, State 1, Line 2<br>
    Invalid column name ' '.</p>
  </blockquote>
  
  <p>I've seen:</p>
  
  <pre><code>SELECT NULLIF(null_column, 0) AS null_column 
  FROM [master].[dbo].[csvimport]
  </code></pre>
  
  <p>But this only works for one column at a time. I'd rather not do this 150 times...</p>