I am not sure why you would want to combine the two. But I recall I once came up with an obscure need for this. I created a column called RS for result set. Set the value to one for the first result set, to two for the second. added the two result sets together increasing the columns. For example say I do the following two selects.
Select firstname, lastname from x
Select city, state from y
the result set would come out like this.....
rs FirstName LastName City State
1 John doe
1 Susan Smith
1 Pewee Herman
1 Dubya Bush
2 Hollywood CA
2 New York NY
2 Oklahoma City OK
2 Seattle WA
Notice for RS = 1 there are not city or state values, and for RS = 2
there are no names.
You can do this with a temp table probably easiest.
Hope this helps,
Rob
|