title: Replace function in SQL Server
body: <p>I have a string of data </p>
  
  <pre><code>'["Dog",,,1,"Person","2020-03-17",,4,"Todd]'
  </code></pre>
  
  <p>I am trying to use the replace function to replace double commas with NULL values </p>
  
  <p>Solution</p>
  
  <pre><code>'["Dog",NULL,NULL,1,"Person","2020-03-17",NULL,4,"Todd]'
  </code></pre>
  
  <p>But I keep ending up with </p>
  
  <pre><code>'"Dog",NULL,,1,"Person","2020-03-17",NULL,4,"Todd'
  </code></pre>
  
  <p><em>(The <code>,,,</code> needs to become <code>,NULL,NULL,</code> but only becomes <code>,NULL,,</code>)</em></p>
  
  <p>Here is my sample code I'm using</p>
  
  <pre><code>   REPLACE(FileData, ',,' , ',NULL,')
     WHERE FileData LIKE '%,,%'
  </code></pre>