View Single Post

   
  #2 (permalink)  
Old 04-17-2008, 10:51 PM
Vyacheslav Kalinin
 
Posts: n/a
Default Re: Need help with a function boolean --> text or array

Patch:
select id, name, rtrim(leading ' ,' from
(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;

Doesn't look too fancy though...

Reply With Quote