Novice question:
How can I apply conditional logic when doing a union of two tables?
TableA TableB
------ ------
value1 value2 value1 value2
1 10 5 15
11 20
SELECT * FROM TableA UNION SELECT * FROM TableB;
returns:
value1 value2
1 10
5 15
11 20
what I want is
value1 value2
1 5
5 15
15 20
The tables are huge and already in ascending order.