Re: How best to turn select result into options like 'a|b|c''

Поиск
Список
Период
Сортировка
От Ray O'Donnell
Тема Re: How best to turn select result into options like 'a|b|c''
Дата
Msg-id 17dd9f16258.2834.f9dd809031fc0469edf0bbbf79c1d468@rodonnell.ie
обсуждение исходный текст
Ответ на How best to turn select result into options like 'a|b|c''  (Shaozhong SHI <shishaozhong@gmail.com>)
Ответы Re: How best to turn select result into options like 'a|b|c''  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
On 20 December 2021 22:10:19 Shaozhong SHI <shishaozhong@gmail.com> wrote:
Is there a way to turn select result into something like 'a|b|c' .
Regards,
David

On my phone so hard to reply properly, but if a, b and c are in separate rows then you need the array_agg() and array_to_string() functions.

Ray.

В списке pgsql-general по дате отправления:

Предыдущее
От: Shaozhong SHI
Дата:
Сообщение: How best to turn select result into options like 'a|b|c''
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: How best to turn select result into options like 'a|b|c''