Concatenating multiple fetches into a single string

Поиск
Список
Период
Сортировка
От Kumar
Тема Concatenating multiple fetches into a single string
Дата
Msg-id 024a01c3b802$d9afac40$7502a8c0@hdsc.com
обсуждение исходный текст
Ответы Re: Concatenating multiple fetches into a single string  (Tomasz Myrta <jasiek@klaster.net>)
Список pgsql-sql
Dear Friends,
 
I am doing a migration from SQL server to Postgres SQL. A simple select fetches the following names.
 
select full_name FROM project_members where project_members.project_role_id in (' + @p_res_ids + ') ;
 
Let us say if the results are
 
full_name
---------------
David
Postgres
plpgsql
 
I need to send the out put as David,Postgres,Plsql -- one string, concatenates the fetches from multiple rows. This was handled in SQL server with a cursor.
 
Can this be handled only by sql manipulation or need to use cursors. If i use cursor in postgres, what is the equivalent of MS SQL Statement
WHILE @@FETCH_STATUS = 0.
 
please shed some light pls.

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

Предыдущее
От: "Richard Sydney-Smith"
Дата:
Сообщение: Ooops ! :( Recovery techniques
Следующее
От: Tomasz Myrta
Дата:
Сообщение: Re: Concatenating multiple fetches into a single string