pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Re: select case problem 2+ messages / 2 participants [nested] [flat]
* Re: select case problem @ 2002-09-24 14:20 Matteo Beccati <m.beccati@crpsoftware.it> parent: Joseph Syjuco <joseph@asti.dost.gov.ph> 0 siblings, 0 replies; 2+ messages in thread From: Matteo Beccati @ 2002-09-24 14:20 UTC (permalink / raw) To: pgsql-sql Hi, select case when division_no is null then 'no division' else 'with division' end from employee; Is the right syntax Regards -- Matteo Beccati http://www.phpadsnew.com http://phppgads.sourceforge.net ^ permalink raw reply [nested|flat] 2+ messages in thread
* select case problem @ 2002-09-24 21:45 Joseph Syjuco <joseph@asti.dost.gov.ph> 0 siblings, 1 reply; 2+ messages in thread From: Joseph Syjuco @ 2002-09-24 21:45 UTC (permalink / raw) To: pgsql-sql 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; ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-09-24 21:45 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2002-09-24 21:45 select case problem Joseph Syjuco <joseph@asti.dost.gov.ph> 2002-09-24 14:20 ` Matteo Beccati <m.beccati@crpsoftware.it>
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