Re: select offset by alphabetical reference

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: select offset by alphabetical reference
Дата
Msg-id 1052288340.17966.13.camel@linda.lfix.co.uk
обсуждение исходный текст
Ответ на select offset by alphabetical reference  ("Dave [Hawk-Systems]" <dave@hawk-systems.com>)
Ответы Re: select offset by alphabetical reference  ("Dave [Hawk-Systems]" <dave@hawk-systems.com>)
Список pgsql-general
On Wed, 2003-05-07 at 06:50, Dave [Hawk-Systems] wrote:
> Have a table with Last, First, etc...
> wish to create a select to grab everything from table whose last name is
> alphabetically greater than 'Smith'
>
> almost like the following (which is obviously incorrect);
>     select last,first from mytable order by last offset 'Smith';
>
> ideas on how to handle this at the postgres level rather than grabbing all and
> storing it in an array in PHP/Perl for post processing to grab the desired
> records?

SELECT last, first FROM mytable WHERE last > 'Smith' ORDER BY last;


--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Dearly beloved, avenge not yourselves, but rather give
      place unto wrath. For it is written, Vengeance is
      mine; I will repay, saith the Lord. Therefore if thine
      enemy hunger, feed him; if he thirst, give him drink;
      for in so doing thou shalt heap coals of fire on his
      head. Be not overcome of evil, but overcome evil with
      good."      Romans 12:19-21


В списке pgsql-general по дате отправления:

Предыдущее
От: "Dave [Hawk-Systems]"
Дата:
Сообщение: select offset by alphabetical reference
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Perl DBI::Pg - Stop button