title: How would you write this query?
body: <p>I'm looking to refactor the below query to something more readable and modifiable.  The first half is identical to the second, with the exception of the database queried from (table names are the same though.)</p>
  
  <pre><code>  SELECT
      Column 1 AS c1,
      ...
      Column N AS cN
    FROM
      database1.dbo.Table1
  
  UNION
  
    SELECT
      'Some String' as c1,
      ...
      NULL as cN
    FROM
      database1.dbo.Table2
  
  UNION
  
    SELECT
      Column 1 AS c1,
      ...
      Column N AS cN
    FROM
      database2.dbo.Table1
  
  UNION
  
    SELECT
      'Some String' as c1,
      ...
      NULL as cN
    FROM
      database2.dbo.Table2
  </code></pre>
  
  <p>This query is the definition of <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" rel="nofollow noreferrer">DRY</a> and is calling to me to be re-written, but I have no idea how!</p>
  
  <p><strong>EDIT</strong>: We can't use linq and we desire distinct results; I'm looking to make the query smaller in physical file size, not in results returned.</p>
  
  <p><strong>EDIT</strong>: The database I'm querying off is a proprietary ERP database.  Restructuring it is not an option.</p>