title: SQL Query Multiple Products on One Order
body: <p>Let's say I have 2 tables:</p>
  
  <pre><code>tOrder               tOrderLine
  ------               ----------
  OrderID              OrderID
  Other Fields         ProductID
                       Other Fields
  </code></pre>
  
  <p>I want to get back all orders that have a certain 2 products on the same order. Currently, I'm doing:</p>
  
  <pre><code>select o.OrderID
  from tOrder o
       inner join tOrderLine ol on o.OrderID = ol.OrderID
       inner join tOrderLine ol2 on o.OrderID = ol2.OrderID
  where ol.ProductID = 67
       and ol2.ProductID = 68
  </code></pre>
  
  <p>This works and gives me the results I need, but it seems a little hokey. Also, if I wanted to get all orders that have a set of 10 items, the query is going to get monstrous.</p>
  
  <p>Is there a better way to do what I'm looking for?</p>