title: SQL-Query: EXISTS in Subtable
body: <p>I have two tables tabData and tabDataDetail.
  I want all idData(PK) from Parent-Table(tabData) that have <strong>only</strong> rows in Child-Table(tabDataDetail, FK is fiData) with:</p>
  
  <ul>
  <li>fiActionCode=11 alone 
  or </li>
  <li>fiactionCode=11 and fiActionCode=34</li>
  </ul>
  
  <p>Any other combination is invalid. How to get them?</p>
  
  <p>What i've tried without success(slow and gives me also rows that have <strong>only</strong> fiActioncode 34) :</p>
  
  <p><a href="https://i.stack.imgur.com/RK2jf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RK2jf.jpg" alt="alt text"></a><br>
  <sub>(source: <a href="http://www.bilder-hochladen.net/files/4709-l0.jpg" rel="nofollow noreferrer">bilder-hochladen.net</a>)</sub>  </p>
  
  <p>Thanks for your Time.</p>
  
  <hr>
  
  <p><strong>EDIT</strong>: Thanks to all for their answers. Now i unfortunately have not enough time to check which one is best or works at all. I marked the first working one as answer.</p>
  
  <p>EDIT2: i think that the marked answer is really the most efficient and compact solution.</p>
  
  <p>EDIT3: Codesleuth's answer is interesting because it returns only rows than have only a single fiActionCode=11. Difficult to see, because that its only true for 20 tabDataDetail-rows ot of 41524189 total-rows that have two. Anyway that was not 100% what i've asked or rather what i was looking for.</p>