title: Splitting text in SQL Server stored procedure
body: <p>I'm working with a database, where one of the fields I extract is something like:</p>
  
  <pre><code>1-117 3-134 3-133
  </code></pre>
  
  <p>Each of these number sets represents a different set of data in another table. Taking <code>1-117</code> as an example, <code>1</code> = equipment ID, and <code>117</code> = equipment settings. </p>
  
  <p>I have another table from which I need to extract data based on the previous field. It has two columns that split equipment ID and settings. Essentially, I need a way to go from the queried column <code>1-117</code> and run a query to extract data from another table where 1 and 117 are two separate corresponding columns.</p>
  
  <p>So, is there anyway to split this number to run this query?</p>
  
  <p>Also, how would I split those three numbers (<code>1-117 3-134 3-133</code>) into three different query sets? </p>
  
  <p>The tricky part here is that this column can have any number of sets here (such as <code>1-117 3-133</code> or <code>1-117 3-134 3-133 2-131</code>).</p>
  
  <p>I'm creating these queries in a stored procedure as part of a larger document to display the extracted data.</p>
  
  <p>Thanks for any help.</p>