DECLARE
V_JSON VARCHAR2(4000);
ECO VARCHAR2(3000);
BEGIN
/*
{
"ChallanNo":"2020-0000000047",
"RefNo":"1234567",
"BankBranchNameEn":"BANK ASIA LTD., HEAD OFFICE",
"BankBranchNameBn":"BANK ASIA LTD., HEAD OFFICE",
"ClientNameEn":"Md Zafar Iqbal Edit",
"ClientNameBn":"মà§à¦ à¦à¦¾à¦«à¦° à¦à¦à¦¬à¦¾à¦² à¦à¦ªà¦¡à§à¦",
"Amount":3450.0,
"ChallanEconomic":[
{
"EconomicCode":"1422311",
"EconomicNameEn":"Passport fee",
"EconomicNameBn":"পাসপà§à¦°à§à¦ ফি",
"ChallanSubNo":"01",
"Amount":3000.0
},
{
"EconomicCode":"1141102",
"EconomicNameEn":"Supplementary duty on domestically produced commodities",
"EconomicNameBn":"দà§à¦¶à¦ à¦à§à¦ªà¦¾à¦¦à¦¿à¦¤ পণà§à¦¯à§à¦° à¦à¦ªà¦° সমà§à¦ªà§à¦°à¦ শà§à¦²à§à¦",
"ChallanSubNo":"02",
"Amount":450.0
}
],
"SuccessFlag":"Y"
}
*/
SELECT a.JSON_RESPONSE.ChallanEconomic.EconomicCode
INTO eco
FROM
IN_OUT_JSON a
WHERE REQUESTID = 27;
eco := LTRIM (RTRIM (eco, ']'), '[');
FOR FOO IN ( SELECT REGEXP_SUBSTR (eco,
'[^,]+',
1,
LEVEL)
TXT
FROM DUAL
CONNECT BY REGEXP_SUBSTR (eco,
'[^,]+',
1,
LEVEL)
IS NOT NULL)
LOOP
DBMS_OUTPUT.PUT_LINE (FOO.TXT);
END LOOP;
END;
Muhammad Abdul Qaium is a Database Engineer/Oracle Apex Developer/BI Developer (in Connecticut, USA) who is an Oracle Certified Cloud Architect Professional, OCI Autonomous DB specialist as well as Oracle Business Intelligence Foundation Suite 11g Certified Implementation Specialist with extensive expertise in Database design , PL/SQL, Oracle Apex, Microsoft SSIS, ETL, Power BI, Qlik Sense, BI Publisher, Jasper Report, OBIEE. Contact: qaiuminfo@gmail.com
Search This Blog
Subscribe to:
Post Comments (Atom)
Java to Oracle database Connection Using JDBC
Oracle database. // Java Program to Establish Connection // in JDBC with Oracle Database // Importing database import java.sql.*; // Import...
-
Search by keyword from Oracle Database Objects. select owner, type, name, line, text from dba_source where 1 = 1 and text like '%TEXT Y...
-
We Can Export Application Components individually from Oracle Apex. Application > Shared Components > Export Application Compo...
No comments:
Post a Comment