Re: [GENERAL] constant column value in view with union - Mailing list pgsql-general

From Oliver Mueschke
Subject Re: [GENERAL] constant column value in view with union
Date
Msg-id 387CE893.D1383668@mueschke.de
Whole thread Raw
In response to constant column value in view with union  (Sarah Officer <officers@aries.tucson.saic.com>)
List 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 by date:

Previous
From: "Bruce Bantos"
Date:
Subject: Re: [GENERAL] Simulating an outer join
Next
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Simulating an outer join