In message <[EMAIL PROTECTED]>, C.P. Web Designs <[EMAIL PROTECTED]> writes >That is because only one ORDER BY clause is used in a UNION >statement, ie: > >SELECT * FROM table1 WHERE cola = 'this' >UNION >SELECT * FROM table1 WHERE cola = 'that' >ORDER BY colb DESC > >V/r, >Charles
Example of (tested and working) UNION statement with 3 ORDER BYs: (SELECT salID FROM sales WHERE salID<2500 ORDER BY salID DESC LIMIT 1) UNION (SELECT salID FROM sales WHERE salID>2500 ORDER BY salID ASC LIMIT 1) ORDER BY salID DESC; -- Pete Clark Sunny Andalucia http://www.hotcosta.com/comm_1.htm
