🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #559

Re: CASE with test on null field

#559
From: Adalberto Baldini
Date: Fri, 21 Sep 2007 06:49
21 lines
1766 bytes
Bill Todd

This works. Thanks.

I followed LangRef book, with field reference immediately after Case :

CASE <expression>
WHEN <expression> THEN <expression> | NULL
[ELSE <expression> | NULL]
[COALESCE <expression>]
[NULLIF <expression, expression, ...>]

select emp.first_name || ' ' || emp.last_name as name,
case proj.proj_name
when 'DigiPizza' then 'Digital Pizza'
when 'AutoMap' then 'AutoMobile Map'
when 'Translator upgrade' then 'Universal Language Translator'
else 'Other'
end as project
from employee emp inner join employee_project emp_proj on emp.emp_no =
emp_proj.emp_no
Technical Details
Message-ID: <46f3696e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46f01a4a@newsgroups.borland.com> <46f02308$1@newsgroups.borland.com> <46f2225c@newsgroups.borland.com> <46f29532$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,fe8d0aeed0af284e
X-Google-Attributes: gid114a0e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 21 Sep 2007 08:49:20 +0200
From: Adalberto Baldini <finman@swissonline.ch>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.interbase.sql
Subject: Re: CASE with test on null field
References: <46f01a4a@newsgroups.borland.com> <46f02308$1@newsgroups.borland.com> <46f2225c@newsgroups.borland.com> <46f29532$1@newsgroups.borland.com>
In-Reply-To: <46f29532$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 87.30.78.40
Message-ID: <46f3696e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1190357358 87.30.78.40 (20 Sep 2007 23:49:18 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail