Thanks Jeremy,
That was easy.
- Ed
Jeremy March [EMAIL PROTECTED] 3/12/04 7:42:12 PM
Can anyone tell me how to sort the combined results of a Union
query?
(Select Name From Employee Group By Name Order By Name)
Union (Select Name From Consultant Group By Name Order By Name);
Just
And if you're sorting by Name in the end, you don't really need to sort
by Name in each SELECT:
(SELECT Name FROM Employee Group By Name)
UNION
(SELECT Name FROM Consultant Group By Name)
ORDER BY Name;
Do you expect the same Name in multiple rows in these tables? If not,
you can drop
Ed Reed [EMAIL PROTECTED] wrote:
Can anyone tell me how to sort the combined results of a Union query?
Right now I have a Group By and Order By in both of my queries that make
up my Union but the results are grouped and sorted within the two
queries but not between the two queries. The example
Can anyone tell me how to sort the combined results of a Union query?
Right now I have a Group By and Order By in both of my queries that make
up my Union but the results are grouped and sorted within the two
queries but not between the two queries. The example below demonstrates
my problem. In
Can anyone tell me how to sort the combined results of a Union query?
(Select Name From Employee Group By Name Order By Name)
Union (Select Name From Consultant Group By Name Order By Name);
Just add another order by on the end after the parenthesis:
(Select Name From Employee Group By