title: Display barcode with TYPE('X','B') > Barcode with TYPE('A')
body: <p>Everyone I just want to display BARCODE with TYPE('B','X') <strong>&gt;</strong> BARCODE with TYPE('A'). also I don't want to display ITEM with only one BARCODE.</p>
  <p>This script is only for displaying barcode with type ('X','B',A'),Because I don't know what the best Condition fit on my request.</p>
  <pre><code>select ITEM,BARCODE,TYPE,STOCKNO. from [DWSTAGE].[INVUPC]
  where type in ('X','B','A') 
  order by item
  </code></pre>
  <p>in my Sample query result.
  My unique TYPE for barcode is 'A'.  And for ('X','B') is intended only for additional barcode under ITEM.
  But problem is TYPE A must &gt; 'B','X'.</p>
  <pre><code>    ITEM              | BARCODE             | TYPE   | STOCKNO.
      ---------------------------------------------------
      12458         |  481181880922       |   A    | 3464
      12458         |  481181880924       |   X    | 3464
      12458         |  481181880926       |   X    | 3464
      30689         |  485481881862       |   B    | 231
      30699         |  485481881861       |   A    | 231
      30699         |  485481881863       |   X    | 231
      11449         |  483981889371       |   A    | 532
      44775         |  480081880924       |   A    | 871
      44775         |  480081880922       |   X    | 871
  </code></pre>
  <p>Expected Result<br />
  display only those barcode with type('B','X') &gt; barcode with type 'A'.</p>
  <pre><code>    ITEM            | BARCODE                | TYPE |   STOCKNO.
      ---------------------------------------------------
      12458         |  481181880924       |   X    | 3464
      12458         |  481181880926       |   X    | 3464
      30689         |  485481881862       |   B    | 231
      30699         |  485481881863       |   X    | 231
  </code></pre>
  <p>Does anyone have any idea on this? Please help.
  Thank you.</p>