Re: Concatenation through SQL

Поиск
Список
Период
Сортировка
От Leif B. Kristensen
Тема Re: Concatenation through SQL
Дата
Msg-id 200712211331.14239.leif@solumslekt.org
обсуждение исходный текст
Ответ на Re: Concatenation through SQL  (Niklas Johansson <spot@tele2.se>)
Список 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 по дате отправления:

Предыдущее
От: Niklas Johansson
Дата:
Сообщение: Re: Concatenation through SQL
Следующее
От: "Philippe Lang"
Дата:
Сообщение: Re: Concatenation through SQL