Hi all,
SQL Server question. I have a query like so:
*******
SELECT *
FROM Table1
WHERE Table1Item  = 'something'

UNION

SELECT *
FROM Table2
WHERE Table2Item = 'something'

********

SQL Server does not allow me to put in individual 'ORDER BY' statements on
the individual selects.

*******
SELECT *
FROM Table1
WHERE Table1Item  = 'something'
ORDER By SomeTableColumn

UNION

SELECT *
FROM Table2
WHERE Table2Item = 'something'
ORDER By SomeTableColumn

********

Instead I can only put an 'ORDER BY' statement at the end of all the
unions. I can't have that. I need to be able to show the results from the
first select first, then the results from the second select.

Any soultions?

Thanks,
George
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to