Re: str_aggr function not wokring
От | aditya desai |
---|---|
Тема | Re: str_aggr function not wokring |
Дата | |
Msg-id | CAN0SRDH82PdCQuScSEe8QcPaDCdErmRpdSSAXs3ZUdDFnsrXKA@mail.gmail.com обсуждение исходный текст |
Ответ на | str_aggr function not wokring (aditya desai <admad123@gmail.com>) |
Список | pgsql-performance |
You realize that there are a million answers to your questions online? Are you doing any google searches before bothering this list with basic questions? I personally never email this list until I’ve exhausted all searches and extensive trial and error, as do most practitioners. This list is incredibly patient and polite, and...there are limits. Please consider doing more research before asking a question. In your example below, you’re getting a basic subquery error – research how to fix that. Mike
From: aditya desai <admad123@gmail.com>
Sent: Thursday, April 08, 2021 4:32 AM
To: Pgsql Performance <pgsql-performance@lists.postgresql.org>
Subject: str_aggr function not wokring
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 по дате отправления: