From: | "Goulet, Dick" <DGoulet(at)vicr(dot)com> |
---|---|
To: | "Michael Fuhr" <mike(at)fuhr(dot)org>, "German Raul Hoyos Parravicino" <rhoyos(at)gmail(dot)com> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Fwd: Question |
Date: | 2006-03-08 14:07:00 |
Message-ID: | 4001DEAF7DF9BD498B58B45051FBEA650340B9B9@25exch1.vicorpower.vicr.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
The syntax in Oracle is "is null" or "is not null" as in:
select count(*) from module_master where gatekeeper_status is null;
And yes that does work in PostGreSql. Now if your talking about the
Oracle function NVL, for Null Value, no that does not work and I don't
see a similar function in PostGreSql. You could create one easily
enough.
Dick Goulet
Senior Oracle DBA
Oracle Certified DBA
-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Michael Fuhr
Sent: Tuesday, March 07, 2006 6:45 PM
To: German Raul Hoyos Parravicino
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Fwd: Question
On Tue, Mar 07, 2006 at 05:09:56PM -0500, German Raul Hoyos Parravicino
wrote:
> I have a problem developing a ECPG program. I am making a programa
using
> FETCH, when the second row is sent the following message appear:
>
> ==>sqlcode [-213] msg[NULL value without indicator in line 1192.]
[...]
> Is it possible to use something similar to "isnull" in Oracle?
Are you looking for the SQL-standard COALESCE?
test=> SELECT COALESCE('foo', 'bar');
coalesce
----------
foo
(1 row)
test=> SELECT COALESCE(NULL, 'bar');
coalesce
----------
bar
(1 row)
See also the ECPG documentation on using indicators to detect NULL.
--
Michael Fuhr
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2006-03-08 17:24:12 | Re: Fwd: Question |
Previous Message | Fabrice.Sznajderman | 2006-03-08 08:23:41 | Re: VACUUM Error? |