Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JSON Query

VSatNov 4 2020 — edited Nov 7 2020

Hi , I am having a query written in Oracle 12c and i want to convert the query as JSON Query and return the recordset as json value (Eg: "appid" :1, ,"app_name" :msdn ) etc can anyone help me to convert the same and share to me.
Query to Convert
select distinct * from (SELECT ca.app_id, ca.app_name, ca.description, caa.cust_id, caa.cust_application_allow_id, case when caa.privilege = 1 Then 1 else 0 end as privilege
FROM cyl_app ca
inner join cus_app_all caa on caa.app_id = ca.app_id where
caa.cust_id = custid )
union all
select distinct app_id, app_name, description, 0 as cust_id, 0 as cust_application_allow_id, 0 as privilege from
cyl_app where app_id not in (
SELECT ca.app_id FROM cyl_app ca
inner join cus_app_all caa
on caa.app_id = ca.app_id
where caa.cust_id = custid );

Comments

Processing

Post Details

Added on Nov 4 2020
1 comment
65 views