title: SQL Get Parent Record Chain
body: <p>I have a table like so:</p>
  
  <pre><code>|ItemID|ItemName|ParentID|
  |... etc more records ...|
  |1234  |Itemlol |432     |
  |... etc more records ...|
  |1543  |Kthxhi  |1234    |
  |... etc more records ...|
  |1938  |FunTimes|1543    |
  |... etc more records ...|
  |3765  |Apples  |1938    |
  |... etc more records ...|
  |8634  |Oranges |3765    |
  |... etc more records ...|
  </code></pre>
  
  <p>Can I make a query where I pass in 3765 and get back:</p>
  
  <pre><code>|1234  |Itemlol |432     |
  |1543  |Kthxhi  |1234    |
  |1938  |FunTimes|1543    |
  </code></pre>
  
  <p>Or, even better... also pass in a "Number of Parents" and get back that many records, since there may be 30 or more parents, but I typically only want 8.</p>