From: Jochen Schmidt <jochen@joyce.giub.uni-bonn.de>
To: pgsql-sql@postgresql.org
Subject: isnull or coalesce isn't working
Date: Thu, 29 Jun 2000 15:58:22 +0200 (MEST)
Message-ID: <200006291358.PAA03520@joyce.giub.uni-bonn.de> (raw)
HI
just started using postgres I want to do a select like the following.
I have a table with two columns a and b, in b sometimes data are missing.
I want to select column b, and if data are missing instead column a
as one column in my select.
I did:
SELECT ifnull(a,b) FROM table;
==>ERROR: No such function 'ifnull' with the specified attributes
tried the same thing with isnull and coalesce, same error.
(on my machine: postgresql version 6.4.2)
help?! thanks, jochen
--
............................................................................
. * .
. Dipl. Geogr. Jochen Schmidt * | | .
. | | | | .
. Department of Geography phone +49/0228/739646 | | | | * .
. University of Bonn fax +49/0228/739099 | |_| | | |.
. Meckenheimer Allee 166 jochen.schmidt@uni-bonn.de \___ |_| |.
. D - 53115 Bonn http://slide.giub.uni-bonn.de/~jochen | ___/.
. | | .
............................................................................
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: jochen@joyce.giub.uni-bonn.de
Subject: Re: isnull or coalesce isn't working
In-Reply-To: <200006291358.PAA03520@joyce.giub.uni-bonn.de>
References: <200006291358.PAA03520@joyce.giub.uni-bonn.de>
* 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