title: Optionally use a UNION from another table in T-SQL without using temporary tables or dynamic sql?
body: <p>I have two sql server tables with the same structure. In a stored procedure I have a Select from the first table. Occasionally I want to select from the second table as well based on a passed in parameter. </p>
  
  <p>I would like a way to do this without resorting to using dynamic sql or temporary tables. </p>