Re: Need help with a function boolean --> text or array
От
Vyacheslav Kalinin
Тема
Re: Need help with a function boolean --> text or array
Дата
Msg-id
9b1af80e0801222103l3e245ba7l92f75fbed7df9181@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Need help with a function boolean --> text or array Andreas <maps.on@gmx.net>
Re: Need help with a function boolean --> text or array "Vyacheslav Kalinin" <vka@mgcp.com>
Re: Need help with a function boolean --> text or array "Vyacheslav Kalinin" <vka@mgcp.com>
Re: Need help with a function boolean --> text or array "Andrej Ricnik-Bay" <andrej.groups@gmail.com>
Re: Need help with a function boolean --> text or array Andreas <maps.on@gmx.net>
Re: Need help with a function boolean --> text or array "Andrej Ricnik-Bay" <andrej.groups@gmail.com>
On Jan 23, 2008 7:19 AM, Andreas <maps.on@gmx.net> wrote:
Uh,Hi,
I've got a table with a couple of boolean columns which represent
attributes of entities.
Now I need to list those entities with the attributes cumulated into one
text-column.
How could I do this?
select id, name, (case when has_olive then 'Olive' else '' end) ||
(case when has_cheese then ', Cheese' else '' end) ||
(case when has_onion then ', Onion' else '' end) ||
(case when has_salami then ', Salami' else '' end) ||
(case when has_egg then ', Egg' else '' end) ||
(case when has_extra_hot_chilies then ', Extra hot chilies' else '' end) as addons
from pizzas;
В списке pgsql-novice по дате отправления
От: Vyacheslav Kalinin
Дата: