|
think I got it...
values *json_object*(
key 'test'
*value*
(select *json_arrayagg*(
*json_object*(
*trim*(sys_tname)
*value* *json_object*(
'tableName' *value* *trim*
(sys_tname)
)
)
)
from qsys2.systables
where sys_dname = 'QGPL')
);
On Mon, Nov 27, 2023 at 11:25 AM Jay Vaughn <jeffersonvaughn@xxxxxxxxx>
wrote:
So when I do the below, I get a list of objects as expected...
*-- values json_object(*
*-- key 'test'*
*-- value * (select *json_object*(
*trim*(sys_tname)
*value* *json_object*(
'tableName' *value* *trim*
(sys_tname)
)
)
from qsys2.systables
where sys_dname = 'QGPL');
*-- ); *
But when I remove the comments, because I want the list of objects within
another object, I get the following error...
sqlcode -811
THE RESULT OF AN EMBEDDED SELECT STATEMENT OR A SUBSELECT IN THE SET
CLAUSE OF AN UPDATE STATEMENT IS A TABLE OF MORE THAN ONE ROW, OR THE
RESULT OF A SUBQUERY OF A BASIC PREDICATE IS MORE THAN ONE VALUE
So what is the correct syntax?
tia
Jay
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.