| От | Stephen Quinney |
|---|---|
| Тема | Combining values in a column |
| Дата | |
| Msg-id | 20050415092227.GA24135@computing-services.oxford.ac.uk обсуждение исходный текст |
| Ответы |
Re: Combining values in a column
|
| Список | pgsql-sql |
I have a query which returns a single column of integers which I want to combine together with &, "bitwise AND". Basically it's a simple list of access levels that a user might have and I want to merge the list into one value. There can be zero, one or more values in the list so I have to be able to cope with the no-results . For example access -------- 31 511 Would lead to 31 & 511 which gives 31. I guess really this can lead to the more generic question. How do I apply a general function to combine the values, if I, for example, wanted to write my own aggregate function like sum? Thanks in advance, Stephen Quinney
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера