title: How to use UNION while inserting in a table using SELECT clause from many tables in SQL Server 2000
body: <p>I am using SQL Server 2000. I have multiple criterias which i have to use to extract different sets of records from mumtiple table in another  table. I am using </p>
  
  <pre><code>INSERT INTO T1(A,B)
  (SELECT E,R FROM T2)
  UNION
  (SELECT Z,X FROM T3)
  </code></pre>
  
  <p>Query analyzer is throwing error that while using <code>UNION</code>, you should use <code>ORDER BY</code> clause with <code>SELECT</code>. Even after doing that i m not able to union two different queries which are returing same columns in their select clause.</p>
  
  <p>What is the right way to insert using <code>SELECTS</code> with <code>UNIONS</code> and <code>ORDER BY</code>.</p>