Oracle Regular query JSON returns the value of a field in a message

Source: Internet
Author: User

The interface return message is in JSON format, as follows:

{"Body": {"Businessinfo": {"c1rate": "25.00", "C2rate": "0.00", "C4rate": "0.00", "C5rate": "0.00", "C6rate": "6.00", " C8rate ":" 0.00 "," D1rate ":" 0.00 "," D2rate ":" 1.00 "," Riskcode ":" 0355 "," RuleId ":" R74000154606_11-0 "}," Vehicleinfo ": { "C1rate": "4.00", "C2rate": "0.00", "C4rate": "0.00", "C5rate": "0.00", "C6rate": "6.00", "C8rate": "0.00", "D1rate": "0.00 "," D2rate ":" 1.00 "," Riskcode ":" 0330 "," RuleId ":" R74000154617_11-0 "}}," Head ": {" error_code ":" 0000 "," error_message " : "Success", "Request_type": "???", "Response_code": "0"}}

Gets the value of the c1rate in the return message, using the Oracle regular query

Sql

Select I.c_app_no, i.c_req_content as Reuqest,
I.c_res_content as response,
Regexp_substr (c_res_content, ' \ "c1rate\": \ "([0-9.] +) \ "', 1, 1, ' I ') as C,
Regexp_substr (Regexp_substr (c_res_content, ' \ "c1rate\": \ "([0-9.] +) \ "', 1, 1, ' I '), ' ([0-9.] {2,}) ', and ' I ') as D
From Web_interface_soap_content I
WHERE c_app_no = ' 5997499035520170000382 ' and
C_interface_code = ' Feecontrlrequest '

Oracle Regular query JSON returns the value of a field in a message

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.