Search Postgresql Archives

concatenation issue ( 8.4 )

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a table with
	name_first
	name_middle
	name_last

if i try concatenating as such:
	SELECT
		name_first || ' ' || name_middle || ' ' || name_last
	FROM
		mytable
	;

I end up with NULL as the concatenated string whenever any of the referred fields contain a NULL value

I tried some text conversion and explicit casting , but that didn't work

What am I doing wrong ?

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux