title: How to make LAG() ignore NULLS in SQL Server?
body: <p>Does anyone know how to replace nulls in a column with a string until it hits a new string then that string replaces all null values below it? I have a column that looks like this</p>
  
  <p>Original Column:</p>
  
  <pre><code>PAST_DUE_COL           
  91 or more days pastdue        
  Null
  Null
  61-90 days past due          
  Null
  Null
  31-60 days past due
  Null
  0-30 days past due
  Null       
  Null
  Null            
  </code></pre>
  
  <p>Expected Result Column:</p>
  
  <pre><code>PAST_DUE_COL           
  91 or more days past due        
  91 or more days past due
  91 or more days past due
  61-90 days past due          
  61-90 days past due 
  61-90 days past due 
  31-60 days past due
  31-60 days past due
  0-30 days past due
  0-30 days past due      
  0-30 days past due
  0-30 days past due
  </code></pre>
  
  <p>Essentially I want the first string in the column to replace all null values below it until the next string. Then that string will replace all nulls below it until the next string and so on. </p>