Re: <no subject>

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: <no subject>
Date: 2003-10-01 10:37:25
Message-ID: 1065004645.22042.177.camel@haggis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2003-10-01 at 04:57, Daniel Schuchardt wrote:
> Hi @ all,
>
> I think thats a bug:
>
> SELECT '#' || '#'
>
> will work but
>
> SELECT '#' || CAST(NULL AS VARCHAR)
>
> will return only empty rows.
> My Query looks like this : SELECT field1 || field2 FROM ...
> If field2 ISNULL then everything is null. CAST does not help.

You want to use COALESCE.

--
-----------------------------------------------------------------
Ron Johnson, Jr. ron(dot)l(dot)johnson(at)cox(dot)net
Jefferson, LA USA

"Our computers and their computers are the same color. The
conversion should be no problem!"
Unknown

In response to

  • <no subject> at 2003-10-01 09:57:29 from Daniel Schuchardt

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2003-10-01 10:41:43 Re: <no subject>
Previous Message Daniel Schuchardt 2003-10-01 10:32:21 Re: <no subject>