Re: Concatenation through SQL - Mailing list pgsql-sql

From Leif B. Kristensen
Subject Re: Concatenation through SQL
Date
Msg-id 200712211331.14239.leif@solumslekt.org
Whole thread Raw
In response to Re: Concatenation through SQL  (Niklas Johansson <spot@tele2.se>)
List pgsql-sql
On Friday 21. December 2007, Niklas Johansson wrote:

>select array_to_string(array[given, patronym, toponym], ' ') from
>persons where person_id=57;
>
>Notice the use of the array[] constructor, instead of the array()
>constructor, which must be fed a subquery which returns only one
> column.

Aah, great!

pgslekt=> select array_to_string(array[given, patronym, toponym], ' ')
from persons where person_id=57;    array_to_string
--------------------------Abraham Jonsen Bjørntvet
(1 row)

Tackar och bockar!
--
Leif Biberg Kristensen | Registered Linux User #338009
http://solumslekt.org/ | Cruising with Gentoo/KDE
My Jazz Jukebox: http://www.last.fm/user/leifbk/


pgsql-sql by date:

Previous
From: Niklas Johansson
Date:
Subject: Re: Concatenation through SQL
Next
From: "Philippe Lang"
Date:
Subject: Re: Concatenation through SQL