Re: [GENERAL] constant column value in view with union

Поиск
Список
Период
Сортировка
От Oliver Mueschke
Тема Re: [GENERAL] constant column value in view with union
Дата
Msg-id 387CE893.D1383668@mueschke.de
обсуждение исходный текст
Ответ на constant column value in view with union  (Sarah Officer <officers@aries.tucson.saic.com>)
Список pgsql-general
Sarah Officer wrote:

> > The view is something like this:
> >
> > create view Foo as
> >   select a, b, c, 'OK' as status
> >   from table1
> >   where ...
> > union
> >   select a, b, c, 'BAD' as status
> >   from table1
> >   where ...
> >

you could try it with a CASE WHEN ... THEN ... ELSE ... END


oliver

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