Hi all,
Suppose you have 2 tables that relate as 1:n. When joining the tables in a query without filtering, the result will be n rows.
My requirement is to have just one row returned, with the values of the n-table shown as an array. In SQL Server you could use a query like
SELECT
p.PK_ONETEST,
p.Name,
p.Description,
(SELECT
c.Name
FROM ODS.NTEST c
WHERE c.FK_ONETEST = p.PK_ONETEST
FOR JSON PATH) AS Children
FROM ODS.ONETEST p
;
resulting in

My question is if we can also achieve this in one or more steps in One Desktop.
Kind regards,
Albert