Re: - Mailing list pgsql-general

From Ron Johnson
Subject Re:
Date
Msg-id 1065004645.22042.177.camel@haggis
Whole thread Raw
In response to  ("Daniel Schuchardt" <daniel_schuchardt@web.de>)
List 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.l.johnson@cox.net
Jefferson, LA USA

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


pgsql-general by date:

Previous
From: "Daniel Schuchardt"
Date:
Subject: Re:
Next
From: Oliver Elphick
Date:
Subject: Re: