• You might be able to get around this if you use TOP 100 PERCENT on your subquery that you want to order by.

     
    
    use pubs
    go

    SELECT title, 'titles' WHEREFROM FROM titles
    UNION
    SELECT title, 'author' WHEREFROM FROM (SELECT TOP 5 au_fname title FROM authors ORDER BY au_fname DESC) A
    ORDER BY title

    Gary Johnson

    Microsoft Natural Language Group

    DBA, Sr. DB Engineer




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.