title: SORT ACCESS UNION QUERY SQL
body: <p>I applied a union query in this data</p>
  
  <pre><code>DRAW NO    C1   C2   C3   C4   C5   C6   C7   C8
  DWG-1      D    D    C    C    A    A    B    B
  DWG-2      B    B    A
  </code></pre>
  
  <p>Using this sql </p>
  
  <pre><code>SELECT [DRAW NO], [C1] AS Data FROM Query2
  UNION SELECT [DRAW NO], [C2] FROM Query2
  UNION SELECT [DRAW NO], [C3] FROM Query2
  UNION SELECT [DRAW NO], [C4] FROM Query2
  UNION SELECT [DRAW NO], [C5] FROM Query2
  UNION SELECT [DRAW NO], [C6] FROM Query2
  UNION SELECT [DRAW NO], [C7] FROM Query2
  UNION SELECT [DRAW NO], [C8] FROM Query2;
  </code></pre>
  
  <p>And the results is like this</p>
  
  <pre><code>DRAW NO      DATA
  DWG-1        A 
  DWG-1        B
  DWG-1        C
  DWG-1        D
  DWG-2        A
  DWG-2        B
  </code></pre>
  
  <p>Is it possible to change the output to this kind of sorting?</p>
  
  <pre><code>DRAW NO      DATA
  DWG-1        D 
  DWG-1        C
  DWG-1        A
  DWG-1        B
  DWG-2        B
  DWG-2        A
  </code></pre>
  
  <p><strong>Edit</strong> from the OP's comment:<br/>
  I need to get the value of c1 first.. then c2.. if c2 has duplicates c3 should be the next value and so on. </p>