Re: append columns that are null - Mailing list pgsql-sql

From nobody
Subject Re: append columns that are null
Date
Msg-id ccj224$1jq7$1@news.hub.org
Whole thread Raw
In response to Re: append columns that are null  (Gerwin Philippo <gerwin@vernet.nl>)
Responses Re: append columns that are null  (Gerwin Philippo <gerwin@vernet.nl>)
List pgsql-sql
You are welcome. Only if all problems were that simple ;-)...
"Gerwin Philippo" <gerwin@vernet.nl> wrote in message
news:40ecf718$0$36169$e4fe514c@news.xs4all.nl...
> THX! didn't know that one yet :)
>
> nobody wrote:
> > "Gerwin Philippo" <gerwin@vernet.nl> wrote in message
> > news:40ec1043$0$559$e4fe514c@news.xs4all.nl...
> >
> >>I have function that appends 2 columns, like
> >>"new.field1 = new.field2||new.field3",
> >>but when field 3 is null, then the entire outcome is null, while I
> >>expected just field2, since when I append nothing to field2, I get
> >>field2, right?
> >>Is this standard behaviour, and if so, is there another append function
> >>that I can use that doesn't behave like this?
> >
> >
> > COALESCE is your friend...
> >
> >




pgsql-sql by date:

Previous
From: Gerwin Philippo
Date:
Subject: Re: append columns that are null
Next
From: David Inglis
Date:
Subject: Help with sql statement grouping and distinct