Re: sql questions

Поиск
Список
Период
Сортировка
От Thiemo Kellner
Тема Re: sql questions
Дата
Msg-id 20180720150753.817240u65vouisis@www.gelassene-pferde.biz
обсуждение исходный текст
Ответ на sql questions  (hamann.w@t-online.de)
Ответы Re: sql questions
Список pgsql-general
Zitat von hamann.w@t-online.de:

> a) I am running some select query
> select ... order by ....
> Now, I would like to preserver the ordering through further  
> processing by adding a sequence number
> Of course I can do:
> create temp sequence mseq;
> select xx.*, nextval('mseq') as ord from (select ... order by ....) xx;
> drop sequence mseq;
> Is there a simpler way (avoiding the create/drop parts)

Can't you just do the ordering at the end of the processing? Maybe you  
need to drag along the order by columns and just dump them at the very  
end if applicable.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Вложения

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: sql questions
Следующее
От: Brian Dunavant
Дата:
Сообщение: Re: sql questions