title: Extract a substring from the end of a string in sql server
body: <p>I have following string :</p>
  
  <pre><code>DECLARE @build_names VARCHAR(5000) = NULL; 
  
  SET @build_names = 'BB10-1_X-4759-566549'; 
  </code></pre>
  
  <p>i want to extract it from the last, <code>-</code> is the delimiter. The string will be extracted into 3 sub-strings i.e. <code>566549</code>, <code>4759</code>, <code>BB10-1_X</code>.</p>
  
  <p>Please help me, I am a beginner.</p>