| От | Andreas |
|---|---|
| Тема | need magic to shuffle some numbers |
| Дата | |
| Msg-id | 4E540434.2000603@gmx.net обсуждение исходный текст |
| Ответы |
Re: need magic to shuffle some numbers
|
| Список | pgsql-sql |
Hi, there is a table that has among others a integer primary key "id" and another integer column "prio" as well as an integer "group_id". I'd like to invert the values of the prio-column for one of the groups. The prio numbers start with 3 and there are 1159 different prios in this group. At least every value appeares only once. :) Is there an elegant way to switch the prio values around so that every record with the first prio gehts the last and vice versa? Then the records with the second smallest prio get the second-to-last biggest value and v.v. ... regards
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера