Re: Select Statement

From: Shakespeare <whatsin_at_xs4all.nl>
Date: Tue, 27 May 2008 10:17:25 +0200
Message-ID: <483bc3a5$0$14350$e4fe514c@news.xs4all.nl>

"Frank van Bortel" <frank.van.bortel_at_gmail.com> schreef in bericht news:ebe1$48380ef0$524b5c40$10094_at_cache6.tilbu1.nb.home.nl...
> Shakespeare wrote:
>
>> -select case
>> - when greatest(a,b,c)=-99999 then -99999
>> - when least(a,b,c)=-99999 then 0
>> - else a+b-c
>> - end calc
>> - from table
>>
>
> "end calC" should be end caSE, I presume
>
> --
>
> Regards,
> Frank van Bortel

  1. I didn't write this query
  2. NO. calc is the column alias. Read it like -select case - when greatest(a,b,c)=-99999 then -99999 - when least(a,b,c)=-99999 then 0 - else a+b-c - end AS calc
    >> - from table

If one would use case i.s.o. calc the (pseudo) column would be named case. Works, but is a reserved word.

Shakespeare Received on Tue May 27 2008 - 03:17:25 CDT

Original text of this message