title: SQL Results for Duplicates - Oracle
body: <p>SO community, here's my SQL query which runs with no error:</p>
  
  <pre><code>SELECT DISTINCT
      (L.LOCATION) AS "LOC",
      C.CITY_NAME AS "CIT",
      H.STREET_NAME AS "STR",
      U.APT_NAME AS "APT",
      U.NUM AS "NUM",
      L.DESCRIPTION AS "DES",
      H.POP AS "POP",
      S.STATE_CODE AS "STA",
      H.SITE_NAME AS "SIT",
      U.COUNTY AS "COU",
      L.DESCRIPTION AS "PRO"
  FROM
      LOCATIONS L
      LEFT OUTER JOIN CGZIP9 Z
      ON L.L_ZIPCODE = Z.ZIPCODE
      LEFT OUTER JOIN STREET_V H
      ON L.LOCATION = H.LOCATION
      LEFT OUTER JOIN CGZIPCITY Y
      ON Z.CITYID = Y.CITYID
      LEFT OUTER JOIN CGCITY C
      ON Y.CITYID = C.CITYID
      LEFT OUTER JOIN CGSTATE S
      ON C.STATEFIPS = S.STATEFIPS
      LEFT OUTER JOIN UNIT U
      ON L.UNITID = U.UNIT_ID
  WHERE
      L.LOCATION IN ('1', '2', '3', '4', '5', '1', '2', '4')
      ORDER BY L.LOCATION ASC;
  </code></pre>
  
  <p>I'm trying to retrieve records for all values in my IN (even the duplicates such as '1', '2', &amp; '4')</p>
  
  <p>Here's my output when I run the above code:</p>
  
  <pre><code>=============================================
  |LOC|CIT|STR|APT|NUM|DES|POP|STA|SIT|COU|PRO|
  =============================================
  | 1 | X | X | X | X | X | X | X | X | X | X | 
  | 2 | X | X | X | X | X | X | X | X | X | X |
  | 3 | X | X | X | X | X | X | X | X | X | X |  
  | 4 | X | X | X | X | X | X | X | X | X | X | 
  | 5 | X | X | X | X | X | X | X | X | X | X |  
  =============================================
  </code></pre>
  
  <p>Here's my desired output:</p>
  
  <pre><code>=============================================
  |LOC|CIT|STR|APT|NUM|DES|POP|STA|SIT|COU|PRO|
  =============================================
  | 1 | X | X | X | X | X | X | X | X | X | X | 
  | 2 | X | X | X | X | X | X | X | X | X | X |
  | 3 | X | X | X | X | X | X | X | X | X | X |  
  | 4 | X | X | X | X | X | X | X | X | X | X | 
  | 5 | X | X | X | X | X | X | X | X | X | X |  
  | 1 | X | X | X | X | X | X | X | X | X | X | 
  | 2 | X | X | X | X | X | X | X | X | X | X |  
  | 4 | X | X | X | X | X | X | X | X | X | X |  
  =============================================
  </code></pre>
  
  <p>Any suggestions as to how I can accomplish this?</p>