Questions tagged [string-aggregation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2
votes
1answer
33 views

How to include empty values using in a query to create relationship between column and row

I have a query who returns the next results +-----------+--------+-------+ | idPeriodo | codigo | valor | +-----------+--------+-------+ | 1 | 7 | 1000 | | 1 | 8 | 1000 | ...
1
vote
1answer
88 views

json_agg with dynamic 0-level key

I'm migrating a schema from NoSQL to postgres. Today's object "b" exists in NoSQL as an element of object a & looks in source like this... { "a": { "id": 1, "b":{ "c1": { "...
1
vote
3answers
167 views

Join Comma Separated Same Value

create table dbo.CourseMaster ( CourseId char(2), CourseName char(3) ); create table dbo.StudentMaster ( ROLLNO char(5), NAME varchar(10), ADDRESS varchar(20), Course varchar(100) ); ...
2
votes
2answers
487 views

How to “flatten” multiple rows with same ID (Oracle 11g) by concatenating **multiple** fields per row?

I'm connected to an Oracle Database (11g Release 2 - 11.2.0.4). I'd like to "flatten"/"merge" all rows with the same ID, pretty much as is well delineated here: https://www.w3resource.com/mysql/...
0
votes
1answer
666 views

Postgresql, escape character in string_agg function

Question, can I add escape character \ just for fields param_name and value for this? string_agg(distinct '{name:"' || param_name || '",value:"' || value || '"}',',') as "params", Result is. {name:"...
-1
votes
2answers
40 views

How to get column values in where condition in sub query? [closed]

I am trying to get distinct list of values in where condition through sub query but it shows 0 rows in result set. Here is my query. SELECT a.topic_id, t.id as topicid, t.value as value, t.topic as ...
-1
votes
1answer
31 views

query with LISTAGG() string function does not give the desired output

I'm new to ORACLE and I'm trying to use a string aggregation function in my query to concatenate the value of rows with a comma , this is the structure of my tables: Student(STUDENT_ID,student_name,...
0
votes
1answer
43 views

Another - ERROR: column “da2.dependency_device_name” must appear in the GROUP BY clause or be used in an aggregate function

I am attempting to aggregate dependency_device_name into one string, "Dependency List". Here is the error: ERROR: column "da2.dependency_device_name" must appear in the GROUP BY clause or be ...
0
votes
1answer
70 views

Recursive CTE throws temp tablespace is empty error

I need to aggregate the contents of multiple rows into a row as a delimited text. Here's the simplified table with sample data which represents what i want to do. CREATE TABLE SPD_OWNER.EMP ( ...