I want to select the union of the results from two queries. What I'm trying to do is select one entry with a certain constraint, then add the remaining order by some other constraint.
I tried to do Union, but the order by on the second query fails, as it cannot order on a sub-query.
So what I did is declare a table variable, and then insert the single entry, then insert the rest of the entries order by constraint.
Is there a way to do this using union?