View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 07:31 PM
charliek
 
Posts: n/a
Default Re: Sorting in query with Union

On Fri, 24 Oct 2003 13:10:51 -0400, "Karen Bailey"
<karenb@centurysystems.net> wrote:

>Hi,
>
>I am attempting to write a complex query to group sets of data. I have my
>query working correctly, but i ran into a problem with sorting.
>
>I want to sort my query by a string field.
>
>Is there a way around sorting using a field other than numeric of a query
>containing a union?
>
>Thanks,
>
>Karen
>


You could do something like:

use northwind

(
select city
from customers
union
select city
from employees
)
order by city desc
Reply With Quote