title: SQL select query to return only if a record has a field of a single value
body: <p>I have built my query here thus far:</p>
  
  <pre><code>SELECT POLICYNUMBER, FPLAN, FEFFYY, FEFFMM, FEFFDD, FINSTP, CLIENTNUM, FIRSTNAME, 
  MIDNAME, LASTNAME, BIRTHDATE FROM PFCASBENE 
  INNER JOIN CMRELATN ON POLICYNUMBER = KEYFIELD1 
  INNER JOIN CMPERSON ON CLIENTNUM = CLIENTID
  WHERE FPSFLG='I' OR FPSFLG='P' ORDER BY CLIENTNUM ASC
  </code></pre>
  
  <p>The FINSTP field has a single character for an insurance type code.</p>
  
  <p>EDIT:  POLICYNUMBER, FPLAN, FEFFYY, FEFFMM, FEFFDD, FINSTP are fields in PFCASBENE
    CLIENTNUM is a field in CMRELATN and FIRSTNAME, 
      MIDNAME, LASTNAME, BIRTHDATE are from CMPERSON.  I should have said that before.</p>
  
  <p>I want to return the results if the client <strong>only</strong> has policies that the FINSTP='F'.  If they have other policies that have FINSTP = 'X', 'V', etc, then I don't want any of the clients records in the results.</p>
  
  <p>this query returns multiple rows since a client can have multiple policies.  I can get results if I put FINSTP='F' in the WHERE clause, but that's not what I want.  That returns all that are 'F'.  I'm not sure what else I need to add to the where clause to tune this query to what I need it to do. </p>
  
  <p>This is for a DB2 on an AS/400 system.</p>
  
  <p>Any help would be greatly appreciated!</p>
  
  <ul>
  <li>Josh</li>
  </ul>