title: How to replace a value after the second to last occurrence of a string in SQL Server?
body: <pre><code>declare @test varchar(50) = 'F-1084-002-04-009'
  </code></pre>
  
  <p>I need to replace the value inside the last two dashes to "00"</p>
  
  <p>So it should be this:</p>
  
  <pre><code>F-1084-002-00-009
  </code></pre>
  
  <p>I'm struggling to find the easiest way to do this.</p>