Re: Re: How important is your Express or Web Edition database? Please weigh in--

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




There isn't a BOTTOM, the solution looks something like this:

SELECT * FROM (SELECT TOP 10 * FROM (SELECT TOP 20 * FROM table WHERE
clause ORDER BY col) AS temp ORDER BY col DESC) as temp2 ORDER BY col

It's an awful mess, but was the only way I found to select results x to
y in a reliable manner.

Does this work?

select field from (
  select row_number() over (order by field) as rn,
  field
    from table
) x where rn between 6 and 10;

(what the o'reilly "sql cookbook" suggests will work).

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux