In message <[EMAIL PROTECTED]>, Pete <[EMAIL PROTECTED]>
writes
>I tried this, because I have something similar that I need - "show me
>the next and previous record WHERE... "
>
>But I can't get your example to work, I get the error message
>"Incorrect usage of UNION and ORDER BY"
>
>The full SQL command that I am using is
>SELECT * from sales ORDER BY salID ASC LIMIT 1 
>UNION 
>SELECT * from sales ORDER BY salID DESC LIMIT 1; 
>
>Have I done something silly?

Yes, I have <G> - it should be
(SELECT...LIMIT 1) on both lines!

-- 
Pete Clark

Sunny Andalucia
http://www.hotcosta.com/comm_1.htm

Reply via email to