Re: Update Current Row Based on Prior Row

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Update Current Row Based on Prior Row
Дата
Msg-id 23694.1338671831@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Update Current Row Based on Prior Row  (Philip Brooks <philswatch@yahoo.com>)
Список pgsql-novice
Philip Brooks <philswatch@yahoo.com> writes:
> In SQLite, I did it with this:
> UPDATE bf
> SET title = (
> � SELECT title
> � FROM bf AS prev
> � WHERE title IS NOT NULL AND prev.rowid < bf.rowid
> � ORDER BY prev.rowid DESC
> � LIMIT 1
> )
> WHERE title IS NULL

> The update is not porting to Postgresql.

Really?  Seems to work for me.

            regards, tom lane

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

Предыдущее
От: Philip Brooks
Дата:
Сообщение: Update Current Row Based on Prior Row
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Update Current Row Based on Prior Row