pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julius Tuskenis <julius@nsoft.lt>
To: Ashish Karalkar <ashishka@synechron.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Cc: suresh gupta <suresh.g@zensar.com>
Subject: Re: Query related
Date: Fri, 13 Mar 2009 09:52:51 +0200
Message-ID: <49BA10D3.9070200@nsoft.lt> (raw)
In-Reply-To: <49BA0D03.3060005@synechron.com>
References: <004001c9a3a9$9e715dc0$cd64290a@ind.zensar.com>
	<49BA0D03.3060005@synechron.com>

Hello
> postgres=# create table name(fn text,ln text);
fn and ln could be nulls, so instead of
> postgres=# select fn||' '||ln as name from name;
SELECT COALESCE(fn,'')||' '||COALESCE(ln,'') from name should be used. 
This is because NULL||TEXT = NULL


-- 
Julius Tuskenis
Programavimo skyriaus vadovas
UAB nSoft
mob. +37068233050




view thread (4+ messages)

Message-ID: <49BA10D3.9070200@nsoft.lt>
Permalink:  ../49BA10D3.9070200@nsoft.lt/
Also on:    postgresql.org/message-id/49BA10D3.9070200@nsoft.lt

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: julius@nsoft.lt, ashishka@synechron.com, suresh.g@zensar.com
  Subject: Re: Query related
  In-Reply-To: <49BA10D3.9070200@nsoft.lt>

* 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