str_aggr function not wokring

Поиск
Список
Период
Сортировка
От aditya desai
Тема str_aggr function not wokring
Дата
Msg-id CAN0SRDHivv3kOFYcgvQv647F4O5PuKkRJwemm5hesZO75Q=Wjg@mail.gmail.com
обсуждение исходный текст
Ответы RE: str_aggr function not wokring
Список pgsql-performance
Hi,
I need to combine results of multiple rows in one row. I get below error. Could you please help.

Query:

select string_agg((select '******' || P.PhaseName || ' - ' || R.Recommendation AS "ABC" from tblAssessmentRecommendation R,tblAssessmentPhases P
where  R.PhaseID = P.PhaseID  Order BY P.sortOrder DESC),' ') 

Error:

ERROR: more than one row returned by a subquery used as an expression SQL state: 21000

Regards,
Aditya.

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

Предыдущее
От: Szalontai Zoltán
Дата:
Сообщение: procedure using CURSOR to insert is extremely slow
Следующее
От: Hervé Schweitzer (HER)
Дата:
Сообщение: Re: procedure using CURSOR to insert is extremely slow