From: Joseph Syjuco <joseph@asti.dost.gov.ph>
To: pgsql-sql@postgresql.org
Subject: select case problem
Date: 24 Sep 2002 21:45:34 +0000
Message-ID: <1032903934.28249.2.camel@Falcon> (raw)
i have a table with the fields empno (not null) and division_no (null
allowed) what i wanted to do is to do a select case statement such that
when division_no is null itll output 'No division' if its not null itll
output 'with division' unfortunately this statement doesnt work ... i
need help on the correct syntax
select case division_no when null then 'no division' else 'with
division' end from employee;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: joseph@asti.dost.gov.ph
Subject: Re: select case problem
In-Reply-To: <1032903934.28249.2.camel@Falcon>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox