title: One big query to perform multiple WHERE statements
body: <p>I have a list of 116 different combinations of Agents to Vertex/Geo that I have to make sure are paired together.  For example here is small piece of my 116 list.</p>
  
  <pre><code>AGNT    Vertex/Geo
  5040    440292570
  2010    440390000
  1010    440390060
  1180    440390246
  1800    440390570
  1130    440391110
  1830    440391680
  1410    440395020
  1060    440397460
  2000    440399685
  1460    440399687
  2020    440710000
  1030    440710210
  </code></pre>
  
  <p>I have been using this query to check each pair 1-by-1.  In other words, I have to keep changing the agnt_hse and VRTX_GEOCODE_HSE to check each pair is correct.</p>
  
  <pre><code>USE ExternalUser
  
  SELECT  distinct HSE_KEY_HSE AS HOUSE_KEY, AGNT_HSE AS AGENT, VRTX_GEOCODE_HSE as GEOCODE
  
  FROM        ExternalUser.Vantage.HSE_BASE 
        INNER JOIN externaluser.Vantage.HSL_LOB ON HSE_KEY_HSE = HSE_KEY_HSL 
        LEFT JOIN externaluser.Vantage.HSM_MEMO ON HSE_KEY_HSE = HSE_KEY_HSM
  
  WHERE MEMO_NO_HSM = 1 
  And sys_hsl = '8777' 
  And sys_hsm = '8777'
  And delivery_segment_id_hsl = 'C' 
  And agnt_hse in ('5040') and VRTX_GEOCODE_HSE != '440292570'
  </code></pre>
  
  <p>Is there a way to run multiple queries all at once?</p>
  
  <p>I am familiar with the UNION command but felt there could be a way to condense the coding even more since I'd be pasting a large query over 100x's if I were forced to use the UNION command.</p>
  
  <p>I'm thinking something along the lines of</p>
  
  <pre><code>WHERE MEMO_NO_HSM = 1 
  And sys_hsl = '8777' 
  And sys_hsm = '8777'
  And delivery_segment_id_hsl = 'C' 
  And agnt_hse in ('5040') and VRTX_GEOCODE_HSE != '440292570' 
  Then agnt_hse in ('2010') and VRTX_GEOCODE_HSE != '440390000' 
  Then agnt_hse in ('1010') and VRTX_GEOCODE_HSE != '440390060' 
  ...etc
  </code></pre>
  
  <p>Maybe I'm going about this all wrong and theres a different way to run the query?
  Any information is greatly appreciate.</p>