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 );