In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Oracle intercepts the contents of JSON string, as shown in the following code:
CREATE OR REPLACE FUNCTION PLATFROM.parsejsonstr (p_jsonstr varchar2,startkey varchar2,endkey varchar2) RETURN VARCHAR2 IS rtnVal VARCHAR2 (1000); FindIdxS NUMBER (2); FindIdxE NUMBER (2); BEGIN if endkey='} 'then rtnVal:=substr (p_jsonstr, (instr (pairjsonstr.startkey) + length (startkey) + 2), (instr (pairjsonstrendkey) instr)-instr (pairjsonstre)-length (startkey)-2)) Else rtnVal:=substr (p_jsonstr, (instr (pairjsonstrGraft startkey) + length (startkey) + 2), (instr (pawnjsonstrary Endkey Endkey instr (pawnjsonstringer startkey))-instr (pairjsonstrand startkey)-length (startkey)-4)); end if; RETURN rtnVal; END parsejsonstr; /
Parameter description:
P_jsonstr: target JSON string
Startkey: the key value of JSON content to be intercepted
Endkey: the next key of the target key
Example: select parsejsonstr (INFO,'AGE', 'HEIGHT') from TTTT
The figure shows the contents of the TTTT table, with an example of intercepting AGE information in INFO.
Summary
The above is the method of intercepting the content of JSON string by Oracle introduced by the editor. I hope it will be helpful to you. If you have any questions, you are welcome to leave a message. The editor will reply you in time!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.