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

From: Oliver Mueschke <o(at)mueschke(dot)de>
To: Sarah Officer <officers(at)aries(dot)tucson(dot)saic(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] constant column value in view with union
Date: 2000-01-12 20:48:19
Message-ID: 387CE893.D1383668@mueschke.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2000-01-12 20:55:57 Re: [GENERAL] Simulating an outer join
Previous Message Bruce Bantos 2000-01-12 20:41:10 Re: [GENERAL] Simulating an outer join