Skip to Main Content

SQL & PL/SQL

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!

Extract CLOB feild from JSON string !

S567Nov 13 2019 — edited Nov 13 2019

Hi Expert,s

I am working on 11g.I am unable to  extract the CLOB feild from JSON string can you please help me out.

Below is table description and sample data.

create table tmp (

ID NUMBER
ACCEPT_OFFER CLOB )

with temp as

(

select

1095020 id,

'{"dataSent":[{"acceptOffersRequest":{"accountID":"107291","assurantEquipmentID":"38010000017660","program":"CHARTERTI","channel":"D2C","customer":{"address":"2727 CENTRAL AVE TAMTOOL TEST 30224","city":"BILLINGS","country":"USA","email":"11-8-19-D2C-trade-smoke-test@spectrumadvantage.org","firstName":"First","lastName":"Last","mobileNumber":"5556919123","state":"MT","zip":"591026688"},"claimAuthorization":"N","collectedDeductible":"N","deviceCollected":"N","isInInventory":"N","offerID":"d861a1ad-0f7e-487e-80ed-74662d516ea7","offerType":"ACCEPTED DEFERRED","sessionID":"d32d60ec-03fc-4698-ab89-a2d512c32d15","subscriberID":"c0857265-2191-4a6c-9632-b","imei":"312222200060178","storeID":"D2C"}}],"dataRecived":{"data":[{"setAcceptOfferResponse":{"setAcceptOfferResult":{"acceptOffers":{"acceptOffersResponse":{"deviceCollectionRequired":"Y","errorMessage":"","manufacturer":"Apple","model":"iPhone X 256GB Silver - ATT","offerID":"d861a1ad-0f7e-487e-80ed-74662d516ea7","offerStatus":"ACCEPTED DEFERRED","rmaExpirationDate":"Sat Nov 30 23:59:59 UTC 2019","rmaNumber":"CCTI30050000237670","serialNumber":"312222200060178","sku":"RTNAIZTISTOR","comcastAccountNumber":"8313200011872661","mobileAccountNumber":"107291","statusCode":"200","transactionDate":"Fri Nov 08 22:15:27 UTC 2019"}}}}}],"warnings":[],"error":[],"route":"/api/devices/euti/acceptoffer","restangularized":true,"fromServer":true,"restangularCollection":false}}'

accept_offer from dual

)

I want to extract the accountID feild for given ID.

Thanks

Comments
Post Details
Added on Nov 13 2019
3 comments
4,323 views