Having two channels separated by commas and try to insert into the table.

Hi, in my procedure there are two upcoming channels as separated by a comma.

Ex:
Channel 1: 1: a, 2, 3: c, 4:d, 5:e, 6:f, 7:g, 8:h, 9:i, 10: I;
Channel 2: 10: a, 11:b, 12:c, 34:d, 45:e, 112:f';

I have a table like this:
 create table temp_updrop (id number ,valto1 varchar2(10),valfrom1 varchar2(10),valto2 varchar2(10),valfrom2 varchar2(10));
Now I want to break the chain that he insert the records as:
Channel 1: 1: a, 2, 3: c, 4:d, 5:e, 6:f, 7:g, 8:h, 9:i, 10: I;
1 insert in valto1
an insert in valfrom1

2. insert into valto1
b insert into valfrom1
.
. so now

Second string
Channel 2: 10: a, 11:b, 12:c, 34:d, 45:e, 112:f'

10 insert into valto2
an insert in valfrom2

11. Insert in valto2
b insert into valfrom2

.
.
.so on.

The chain might have a number any of values separated by commas or null as well.

I started with something lie this but after that I don't know how any help appreciated!...
declare
    vtab   dbms_utility.uncl_array;
    string1 varchar2(4000) :='1:a,2:b,3:c,4:d,5:e,6:f,7:g,8:h,9:i,10:j';
    string2 varchar2(4000) :='10:a,11:b,12:c,34:d,45:e,112:f';
    cnt number;
    
    begin 
            
     dbms_utility.comma_to_table(string1, vtab, cnt);
Thanks in advance!

Published by: BluShadow on 18-Sep-2012 15:28
fixed {noformat}
{noformat} tags.  Ensure you specify the word "code" in lower case in the tags.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

Glad I could help.

Please check the question 'answered' if it is. That helps others to focus on the outstanding issues.

Tags: Database

Similar Questions

  • Extract the XML tags and insert into the table

    Description:

    XML is under inert atmosphere in the table containing the xmltype column. Need to extract value from xml tag and insert into the table.
    Once the XML record Treaty must update the status as 'Y' in the base table

    Problem:
    There are multiple occurrences of some tags that need to be combined and stored in a single column to delineate the '-'. No. area of occurrence can vary for each record.
    There are a few encrypted column that I managed to convert decoded value. But used select distinct... XMLTYPE...
    GTT table is used to store the intermediate result and decoding and the concatenation of several tags occurred using TWG.

    1.No. multiple tag will vary how to extract those and concatenate them into a single column. I assumed his occrrence in 3 for example: < student >
    2. how to set the value NULL if no tag is not present. Tag in XML record number can vary. I know that the complete list of xmltags.
    3 data not found error for some xml documents.

    Kindly Assits how to achieve this.

    version: 11.2.0.3.0

    Table Base: temp_XML

    XML_ID NOT NULL NUMBER (28) - auto-increment using the sequence
    PUBLIC EVENT. Stores the XMLTYPE STORAGE BINARY - XML file
    DATE OF EVTDATE
    STATUS VARCHAR2 (3) DEFAULT ' don't

    Sample XML: Includes all the brands mentioned in the common procedure below.

    <? XML version = "1.0" encoding = "US-ASCII"? >

    "< event xmlns ="http://xmlextrac.test.com/object">."

    < data xmlns = "" >

    < object >

    <>units

    < unit > TLAS < / unit >

    < unit > ATLAS < / unit >

    < / units >

    < receiverNetworks >

    < receiverNetwork > ABSAZAJ0XXXX < / receiverNetwork >

    < / receiverNetworks >

    < correspondentIds >

    < correspondentId > #SWF - ABSAZAJ0XXX < / correspondentId >

    < / correspondentIds >

    < comment >

    < comment / >

    < comment / >

    < comment / >

    < comment / >

    < / comment >

    < memo >

    < memo > 28 < / memo >

    < / memos >

    < tuxedoPriority > 20 < / tuxedoPriority >

    sender <>Mike < / sender >

    < typeReseauId > Message < / typeReseauId >

    < maxRetry > 4 < / maxRetry >

    < msgSecuLevel > CBA < / msgSecuLevel >

    < quantity >

    < amount > 12 < / amount >

    < amount > 34 < / amount >

    < amount > 56 < / amount >

    < / amounts >

    < currencys >

    < currency > $ < / currency >

    < currency > EUR < / currency >

    INR < currency > < / currency >

    < / currencys >

    < msgDateVal > ARST123 < / msgDateVal >

    wder < direction > < / direction >

    < eventType > 113 < / eventType >

    < date > 1407431619 < / date >

    < eventDate > 1407431624 < / eventDate >

    < management > R < / direction >

    < msgRef > R950140807AB6CBE < / msgRef >

    < format > SWF < / size >

    < type > 950 < / type >

    R950140807AB6CBE < WALL > < / WALL >

    < bankingPriority / >

    FSDS < field.20 > < / field.20 >

    < texteType > FSS < / texteType >

    < applicationCode > OHS < / applicationCode >

    < company > KETH < / company >

    < endFct > MOE < / endFct >

    < rate > BAM < / flow >

    < subtype / >

    < text > DQo6MjA6R0wxNDA4MDcwMDA1MTMNCjoyNTo3M == < / text >

    < msgHeaders > ezE6RjAxTE9ZRE5MMjBCWFhYMDAzMjAw = < / msgHeaders >

    < msgTrailer > ezU6e0NISzpEOUFFRUNCN0NBQTl9e1RORzp9fQ == < / msgTrailer >

    < / object >

    < / data >

    Procedure: This works very well for a few xml record and fails for some.

    CREATE OR REPLACE PROCEDURE XML_EXTR
    AS
    CURSOR c1
    IS
    SELECT * FROM temp_XML;

    c1_cur c1% ROWTYPE;

    bamdata_sql VARCHAR2 (3000);
    d_text VARCHAR2 (3000);
    d_msgHeaders VARCHAR2 (3000);
    d_msgTrailer VARCHAR2 (3000);
    x_text VARCHAR2 (3000);
    x_msgHeaders VARCHAR2 (3000);
    x_msgTrailer VARCHAR2 (3000);
    x_eventType VARCHAR2 (3000);
    x_amount number (28.2).
    x_currency VARCHAR2 (3000);
    x_state VARCHAR2 (3000);
    x_units VARCHAR2 (3000);
    x_correspondentId VARCHAR2 (3000);
    X_TYPE VARCHAR2 (3000);
    x_receiverNetworks VARCHAR2 (3000);
    x_bankingPriority VARCHAR2 (3000);
    x_applicationCode VARCHAR2 (3000);
    x_processCounter VARCHAR2 (3000);
    x_obsolescence VARCHAR2 (3000);
    x_maxRetry VARCHAR2 (3000);
    x_retries VARCHAR2 (3000);
    x_fileSize VARCHAR2 (3000);
    x_endFct VARCHAR2 (3000);
    x_subType VARCHAR2 (3000);
    x_field20 VARCHAR2 (3000);
    x_sequenceNumber VARCHAR2 (3000);
    x_requestorDn VARCHAR2 (3000);
    x_responderDn VARCHAR2 (3000);
    x_SWIFTNetService VARCHAR2 (3000);
    x_transfertRef VARCHAR2 (3000);
    x_nonrepudiation VARCHAR2 (3000);
    x_transfertInfo VARCHAR2 (3000);
    x_fileDesc VARCHAR2 (3000);
    x_transfertDesc VARCHAR2 (3000);
    x_logicalName VARCHAR2 (3000);
    x_signIndicator VARCHAR2 (3000);
    x_critId VARCHAR2 (3000);
    x_inFapId VARCHAR2 (3000);
    x_deliveryNotif VARCHAR2 (3000);
    x_comment1 VARCHAR2 (3000);
    x_comment2 VARCHAR2 (3000);
    x_comment3 VARCHAR2 (3000);
    x_comment4 VARCHAR2 (3000);
    x_comments VARCHAR2 (3000);
    x_memo1 VARCHAR2 (3000);
    x_memo2 VARCHAR2 (3000);
    x_memo3 VARCHAR2 (3000);
    x_memo4 VARCHAR2 (3000);
    x_msgSecuLevel VARCHAR2 (3000);
    x_dates VARCHAR2 (3000);
    x_tuxedoPriority VARCHAR2 (3000);
    x_fileDest VARCHAR2 (3000);
    x_stkMsgPDEId VARCHAR2 (3000);
    x_EMTId VARCHAR2 (3000);
    x_LTRcptSyno VARCHAR2 (3000);
    x_LTRcpt VARCHAR2 (3000);
    x_LTEmis VARCHAR2 (3000);
    x_flow VARCHAR2 (3000);
    x_FINCopy VARCHAR2 (3000);
    x_msgDateVal VARCHAR2 (3000);
    x_eventDate VARCHAR2 (3000);
    x_typeReseauId VARCHAR2 (3000);
    x_inFapSeq1 VARCHAR2 (3000);
    x_inFapSeq2 VARCHAR2 (3000);
    x_direction VARCHAR2 (3000);
    x_priority VARCHAR2 (3000);
    x_ack VARCHAR2 (3000);
    x_format VARCHAR2 (3000);
    x_mur VARCHAR2 (3000);
    x_TexteType VARCHAR2 (3000);
    x_creatingUser VARCHAR2 (3000);
    x_fileinfo VARCHAR2 (3000);
    x_company VARCHAR2 (3000);
    x_language VARCHAR2 (3000);
    x_ackText VARCHAR2 (3000);
    x_jaxbRef VARCHAR2 (3000);
    x_jaxbElt VARCHAR2 (3000);
    x_memos VARCHAR2 (3000);
    xmlid number (28);
    x_msgRef1 VARCHAR2 (3000);
    x_msgRef2 VARCHAR2 (3000);
    x_msgRef3 VARCHAR2 (3000);
    x_msgRef4 VARCHAR2 (3000);
    x_sender VARCHAR2 (3000);
    x_amlBehavior VARCHAR2 (3000);
    x_ownerServiceId VARCHAR2 (3000);
    x_correspondentName VARCHAR2 (3000);
    x_correspondentAddress1 VARCHAR2 (3000);
    x_correspondentAddress2 VARCHAR2 (3000);
    x_correspondentAddress3 VARCHAR2 (3000);
    x_correspondentAddress4 VARCHAR2 (3000);
    x_correspondentCity VARCHAR2 (3000);
    x_correspondentCountry VARCHAR2 (3000);
    x_correspondentNetworkAddr VARCHAR2 (3000);
    x_tested VARCHAR2 (3000);
    x_correspondentNetwork VARCHAR2 (3000);
    x_validatedPercentage VARCHAR2 (3000);
    x_nbOfValid VARCHAR2 (3000);
    x_requestRef VARCHAR2 (3000);
    x_notifQueue VARCHAR2 (3000);
    x_requestType VARCHAR2 (3000);
    x_secBpid VARCHAR2 (3000);
    x_queue VARCHAR2 (3000);
    x_receiverCode VARCHAR2 (3000);
    x_receiverInd VARCHAR2 (3000);
    x_validFlag VARCHAR2 (3000);
    x_ownerId VARCHAR2 (3000);
    x_dn VARCHAR2 (3000);
    x_RMAOurBic VARCHAR2 (3000);
    x_RMACorrespondentBic VARCHAR2 (3000);
    x_RMAService VARCHAR2 (3000);
    x_fileMsgRef VARCHAR2 (3000);
    date of x_ext_date;
    x_correspondentAddress VARCHAR2 (3000);
    x_msgrefs varchar2 (3000);
    d_ackText varchar2 (3000);
    ackText varchar2 (3000);
    date of x_extdate;

    BEGIN

    FOR C1_CUR IN C1

    LOOP

    INSERT INTO data_GTT_TEMP)
    eventType, amount, currency, State, units, correspondentId, sender, receiverNetworks, bankingPriority, applicationCode, processCounter.
    obsolescence, maxRetry, reminders, fileSize, endFct, xsubType, field.20, sequenceNumber, requestorDn, responderDn, SWIFTNetService, non-repudiation,
    transfertRef, transfertInfo, fileDesc, transfertDesc, logicalName, signIndicator, critId, inFapId, deliveryNotif, comment1, comment2, comment3, comment4,
    Memo1, memo2, memo3, memo4, msgSecuLevel, dates, tuxedoPriority, fileDest, stkMsgPDEId, EMTId, LTRcptSyno, LTRcpt, LTEmis, flow, FINCopy, msgDateVal,
    eventDate, typeReseauId, inFapSeq1, inFapSeq2, direction, priority, ack,
    msgRef1, msgRef2, msgRef3, msgRef4, amlbehavior, correspondentName, ownerServiceId,
    correspondentAddress1, correspondentAddress2, correspondentAddress3, correspondentAddress4,
    correspondentCity, correspondentCountry, correspondentNetworkAddr, tested,
    correspondentNetwork, validatedPercentage, nbOfValid, requestRef, notifQueue,
    requestType, secBpid, xqueue, receiverCode, receiverInd, validFlag, ownerId, dn, RMAOurBic, RMACorrespondentBic, RMAService,
    fileMsgRef, format, xtype, wall, TexteType, creatingUser, fileinfo,
    company, text, xlanguage, ackText, msgHeaders, msgTrailer, jaxbRef, jaxbElt)
    SELECT
    x.eventType, x.amount, x.currency, x.state, x.units, x.correspondentId, x.sender, x.receiverNetworks, x.bankingPriority, x.applicationCode, x.processCounter,
    x.obsolescence, x.maxRetry, x.Retries, x.FileSize, x.endFct, x.xsubType, x.Field20, x.SequenceNumber, x.requestorDn, x.responderDn, x.SWIFTNetService, x.nonRepudiation,
    x.transfertRef, x.transfertInfo, x.fileDesc, x.transfertDesc, x.logicalName, x.signIndicator, x.critId, x.inFapId, x.deliveryNotif, x.comment1, x.comment2,
    x.comment3, x.comment4, x.Memo1, x.memo2, x.memo3, x.MEMO4, x.msgSecuLevel, x.dates, x.tuxedoPriority, x.fileDest, x.stkMsgPDEId, x.EMTId, x.LTRcptSyno,
    x.LTRcpt, x.LTEmis, x.flow, x.FINCopy, x.msgDateVal, x.eventDate, x.typeReseauId, x.inFapSeq1, x.inFapSeq2, x.direction, x.priority, x.ack,
    x.msgRef1, x.msgRef2, x.msgRef3, x.msgRef4, x.amlbehavior, x.correspondentName, x.ownerServiceId,
    x.correspondentAddress1, x.correspondentAddress2, x.correspondentAddress3, x.correspondentAddress4,
    x.correspondentCity, x.correspondentCountry, x.correspondentNetworkAddr, x.tested,
    x.correspondentNetwork, x.validatedPercentage, x.nbOfValid, x.requestRef, x.notifQueue,
    x.requestType, x.secBpid, x.xqueue, x.receiverCode, x.receiverInd, x.validFlag, x.ownerId, x.dn, x.RMAOurBic, x.RMACorrespondentBic, x.RMAService,
    x.fileMsgRef, x.format, x.xtype, x.mur, x.TexteType, x.creatingUser, x.fileinfo,
    x.Company, x.Text, x.xLanguage, x.ackText, x.msgHeaders, x.msgTrailer, x.jaxbRef, x.jaxbElt

    of temp_XML t, XMLTABLE (XMLNAMESPACES ('http://xmlextrac.test.com/object' as "ns0"), ' / ns0:event' )
    PASSAGE t.BAM_EVENT COLUMNS
    eventType varchar2 (3000) PATH 'data, object, eventType' DEFAULT NULL,
    amount number (28.2) path data/object/amounts"."
    currency varchar2 (3000) PATH 'data, object, currencys, currency' DEFAULT NULL,
    VARCHAR2 (3000) path "data/object / / state of ' DEFAULT NULL, State
    units varchar2 (3000) PATH ' object/data/units' DEFAULT NULL,
    correspondentId varchar2 (3000) PATH "data/object/correspondentIds' DEFAULT NULL,
    sender varchar2 (3000) PATH 'data, object, sender' DEFAULT NULL,
    receiverNetworks varchar2 (3000) PATH "data/object/receiverNetworks' DEFAULT NULL,
    bankingPriority varchar2 (3000) PATH "data/object/bankingPriority' DEFAULT NULL,
    applicationCode varchar2 (3000) PATH ' object/data/applicationCode' DEFAULT NULL,
    processCounter varchar2 (3000) PATH "data/object/processCounter' DEFAULT NULL,
    obsolescence varchar2 (3000) PATH ' data/object/obsolescence' DEFAULT NULL,
    maxRetry varchar2 (3000) PATH ' data/object/maxRetry' DEFAULT NULL,
    attempts to varchar2 (3000) "data/object/attempts" DEFAULT NULL path,.
    size of the file varchar2 (3000) PATH ' data/object/fileSize' DEFAULT NULL,
    endFct varchar2 (3000) PATH "data/object/endFct' DEFAULT NULL,
    xsubType varchar2 (3000) PATH "data/object/subtype' DEFAULT NULL,
    field.20 varchar2 (3000) PATH ' object/data/field.20' DEFAULT NULL,
    sequenceNumber varchar2 (3000) PATH "data/object/sequenceNumber" DEFAULT NULL,
    requestorDn varchar2 (3000) PATH "data/object/requestorDn' DEFAULT NULL,
    responderDn varchar2 (3000) PATH "data/object/responderDn' DEFAULT NULL,
    SWIFTNetService varchar2 (3000) PATH "data/object/SWIFTNetService' DEFAULT NULL,
    non-repudiation varchar2 (3000) PATH ' object/data/repudiation' DEFAULT NULL,
    transfertRef varchar2 (3000) PATH "data/object/transfertRef' DEFAULT NULL,
    transfertInfo varchar2 (3000) PATH "data/object/transfertInfo' DEFAULT NULL,
    fileDesc varchar2 (3000) PATH "data/object/fileDesc' DEFAULT NULL,
    transfertDesc varchar2 (3000) PATH "data/object/transfertDesc' DEFAULT NULL,
    logicalName varchar2 (3000) PATH "data/object/logicalName" DEFAULT NULL,
    signIndicator varchar2 (3000) PATH "data/object/signIndicator' DEFAULT NULL,
    critId varchar2 (3000) PATH "data/object/critId' DEFAULT NULL,
    inFapId varchar2 (3000) PATH "data/object/inFapId' DEFAULT NULL,
    deliveryNotif varchar2 (3000) PATH "data/object/deliveryNotif' DEFAULT NULL,
    COMMENT1 varchar2 (3000) PATH ' data, subject, comments, comment [1] "DEFAULT NULL,
    comment2 varchar2 (3000) PATH 'data, subject, comments, how [2]' DEFAULT NULL,
    comment3 varchar2 (3000) PATH "data/object/observations/comments [3]" DEFAULT NULL,
    comment4, varchar2 (3000) PATH ' data, subject, comments, comment [4] "DEFAULT NULL,
    Memo1 varchar2 (3000) PATH "data/object/memos/memo [1]" DEFAULT NULL,
    Memo2 varchar2 (3000) PATH "data/object/notes/Notes [2]" DEFAULT NULL,
    memo3 varchar2 (3000) PATH "data/object/memos/memo [3]" DEFAULT NULL,
    MEMO4 varchar2 (3000) PATH "data/object/memos/memo [4]" DEFAULT NULL,
    msgSecuLevel varchar2 (3000) PATH "data/object/msgSecuLevel' DEFAULT NULL,
    Date varchar2 (3000) PATH ' object/data/date' DEFAULT NULL,
    tuxedoPriority varchar2 (3000) PATH "data/object/tuxedoPriority' DEFAULT NULL,
    fileDest varchar2 (3000) PATH "data/object/fileDest' DEFAULT NULL,
    stkMsgPDEId varchar2 (3000) PATH "data/object/stkMsgPDEId' DEFAULT NULL,
    EMTId varchar2 (3000) PATH "data/object/EMTId' DEFAULT NULL,
    LTRcptSyno varchar2 (3000) PATH "data/object/LTRcptSyno' DEFAULT NULL,
    LTRcpt varchar2 (3000) PATH "data/object/LTRcpt' DEFAULT NULL,
    LTEmis varchar2 (3000) PATH "data/object/LTEmis' DEFAULT NULL,
    flow varchar2 (3000) PATH "/ object/data flow ' DEFAULT NULL,
    FINCopy varchar2 (3000) PATH ' data/object/FINCopy' DEFAULT NULL,
    msgDateVal varchar2 (3000) PATH "data/object/msgDateVal' DEFAULT NULL,
    eventDate varchar2 (3000) PATH "data/object/eventDate" DEFAULT NULL,
    typeReseauId varchar2 (3000) PATH "data/object/typeReseauId' DEFAULT NULL,
    inFapSeq1 varchar2 (3000) PATH "data/object/inFapSeq1' DEFAULT NULL,
    inFapSeq2 varchar2 (3000) PATH "data/object/inFapSeq2' DEFAULT NULL,
    direction varchar2 (3000) PATH 'data, object, direction' DEFAULT NULL,
    priority varchar2 (3000) PATH ' data/object/priority' DEFAULT NULL,
    ACK varchar2 (3000) PATH ' object/data/ack' DEFAULT NULL,
    msgRef1 varchar2 (3000) PATH ' data, object, msgRefs, msgRef [1] "DEFAULT NULL,
    msgRef2 varchar2 (3000) PATH ' data, object, msgRefs, msgRef [2] "DEFAULT NULL,
    msgRef3 varchar2 (3000) PATH ' data, object, msgRefs, msgRef [3] "DEFAULT NULL,
    msgRef4 varchar2 (3000) PATH ' data, object, msgRefs, msgRef [4] "DEFAULT NULL,
    amlBehavior varchar2 (3000) PATH "data/object/amlBehavior' DEFAULT NULL,
    ownerServiceId varchar2 (3000) PATH "data/object/ownerServiceId' DEFAULT NULL,
    correspondentName varchar2 (3000) PATH ' data/object/correspondentName' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of correspondentAddress1 ' object/data/correspondentLine1Addresse' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of correspondentAddress2 ' object/data/correspondentLine2Addresse' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of correspondentAddress3 ' object/data/correspondentLine3Addresse' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of correspondentAddress4 ' object/data/correspondentLine4Addresse' DEFAULT NULL,
    correspondentCity PATH VARCHAR2 (3000) ' object/data/correspondentCity' DEFAULT NULL,
    correspondentCountry PATH VARCHAR2 (3000) ' object/data/correspondentCountry' DEFAULT NULL,
    correspondentNetworkAddr PATH VARCHAR2 (3000) ' object/data/correspondentNetworkAddr' DEFAULT NULL,
    tested VARCHAR2 (3000) PATH ' data/object/tested' DEFAULT NULL,
    correspondentNetwork PATH VARCHAR2 (3000) ' object/data/correspondentNetwork' DEFAULT NULL,
    validatedPercentage PATH VARCHAR2 (3000) ' object/data/validatedPercentage' DEFAULT NULL,
    nbOfValid PATH VARCHAR2 (3000) ' object/data/nbOfValid' DEFAULT NULL,
    requestRef VARCHAR2 (3000) PATH ' data/object/requestRef' DEFAULT NULL,
    notifQueue PATH VARCHAR2 (3000) ' object/data/notifQueue' DEFAULT NULL,
    requestType PATH VARCHAR2 (3000) ' data/object/requestType' DEFAULT NULL,
    secBpid PATH VARCHAR2 (3000) ' object/data/secBpid' DEFAULT NULL,
    xqueue PATH VARCHAR2 (3000) ' data/object/tail' DEFAULT NULL,
    receiverCode PATH VARCHAR2 (3000) ' object/data/receiverCode' DEFAULT NULL,
    receiverInd PATH VARCHAR2 (3000) ' object/data/receiverInd' DEFAULT NULL,
    validFlag PATH VARCHAR2 (3000) ' object/data/validFlag' DEFAULT NULL,
    ownerId PATH VARCHAR2 (3000) ' data/object/ownerId' DEFAULT NULL,
    DN VARCHAR2 (3000) PATH ' data/object/dn' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of RMAOurBic ' object/data/RMAOurBic' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of RMACorrespondentBic ' object/data/RMACorrespondentBic' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of RMAService ' object/data/RMAService' DEFAULT NULL,
    fileMsgRef PATH VARCHAR2 (3000) ' object/data/fileMsgRef' DEFAULT NULL,
    ackText varchar2 (3000) PATH "data/object/ackText' DEFAULT NULL,
    format varchar2 (3000) PATH "data/object / ' DEFAULT NULL,
    xType varchar2 (3000) PATH ' data/object/type' DEFAULT NULL,
    Wall varchar2 (3000) PATH ' data/object/wall' DEFAULT NULL,
    texteType varchar2 (3000) PATH "data/object/texteType' DEFAULT NULL,
    creatingUser varchar2 (3000) PATH ' data/object/creatingUser' DEFAULT NULL,
    fileInfo varchar2 (3000) PATH ' data/object/fileInfo' DEFAULT NULL,
    VARCHAR2 (3000) path ' data/object/society' DEFAULT NULL, the company
    VARCHAR2 (3000) text ' data/object/text' DEFAULT NULL path.
    xLanguage varchar2 (3000) PATH ' data/object/language' DEFAULT NULL,
    msgHeaders varchar2 (3000) PATH "data/object/msgHeaders' DEFAULT NULL,
    msgTrailer varchar2 (3000) PATH "data/object/msgTrailer' DEFAULT NULL,
    jaxbRef varchar2 (3000) PATH ' info/jaxbRef' DEFAULT NULL,
    jaxbElt varchar2 (3000) PATH "jaxbElt/info") x
    where t.XML_ID = c1_cur. XML_ID and t.status =' no;

    Select x.text, x.msgHeaders, x.msgTrailer in x_msgTrailer, x_msgHeaders, x_text of
    temp_XML t, XMLTABLE (XMLNAMESPACES ('http://xmlextrac.test.com/object' as "ns0"), ' / ns0:event' )
    PASSAGE t.BAM_EVENT COLUMNS
    text varchar2 (3000) PATH data/object/text"."
    msgHeaders varchar2 (3000) PATH "data/object/msgHeaders,"
    msgTrailer varchar2 (3000) PATH "object/data/msgTrailer.
    ) x
    where t.XML_ID = c1_cur. XML_ID;
    Select sysdate in double x_extdate;


    d_text: = utl_raw.cast_to_varchar2 (utl_encode.base64_decode (utl_raw.cast_to_RAW (x_text)));
    d_msgHeaders: = utl_raw.cast_to_varchar2 (utl_encode.base64_decode (utl_raw.cast_to_RAW (x_msgHeaders)));
    d_msgTrailer: = utl_raw.cast_to_varchar2 (utl_encode.base64_decode (utl_raw.cast_to_RAW (x_msgTrailer)));
    -d_ackText: = utl_raw.cast_to_varchar2 (utl_encode.base64_decode (utl_raw.cast_to_RAW (ackText)));

    Select
    EventType, amount, currency, State, units, correspondentid, sender, receivernetworks, bankingpriority,
    applicationcode, processcounter, obsolescence, maxretry, reminders, filesize, endfct, xsubtype, field.20, sequencenumber, requestordn,
    responderdn, swiftnetservice, non repudiation, transfertref, transfertinfo, filedesc, transfertdesc, logicalname, signindicator,
    critid, infapid, deliverynotif, comment1, comment2, comment3, comment4, memo1, memo2, memo3, memo4, msgseculevel, dates, tuxedopriority, filedest,
    stkmsgpdeid, emtid, ltrcptsyno, ltrcpt, ltemis, flow, fincopy, msgdateval, eventdate, typereseauid, infapseq1,
    infapseq2, direction, priority, ack, msgref1, msgref2, msgref3, msgref4, amlbehavior, ownerserviceid, correspondentname, correspondentaddress1, correspondentaddress2, correspondentaddress3, correspondentaddress4,
    correspondentcity, correspondentcountry, correspondentnetworkaddr, test, correspondentnetwork, validatedpercentage, nbofvalid,.
    requestref, notifqueue, requesttype, secbpid, xqueue, receivercode, receiverind, validflag, ownerid, dn, rmaourbic, rmacorrespondentbic, rmaservice, filemsgref,
    acktext, format, xtype, wall, textetype, creatinguser, fileinfo, society, text, xlanguage, msgheaders, msgtrailer, jaxbref, jaxbelt
    in
    x_eventtype, x_amount, x_currency, x_state, x_units, x_correspondentid, x_sender, x_receivernetworks, x_bankingpriority, x_applicationcode, x_processcounter,
    x_obsolescence, x_maxretry, x_retries, x_filesize, x_endfct, x_subtype, x_field20, x_sequencenumber, x_requestordn, x_responderdn, x_swiftnetservice, x_nonrepudiation,
    x_transfertref, x_transfertinfo, x_filedesc, x_transfertdesc, x_logicalname, x_signindicator, x_critid, x_infapid, x_deliverynotif, x_comment1, x_comment2, x_comment3,
    x_comment4, x_memo1, x_memo2, x_memo3, x_memo4, x_msgseculevel, x_dates, x_tuxedopriority, x_filedest, x_stkmsgpdeid, x_emtid, x_ltrcptsyno, x_ltrcpt,
    x_ltemis, x_flow, x_fincopy, x_msgdateval, x_eventdate, x_typereseauid, x_infapseq1, x_infapseq2, x_direction, x_priority, x_ack, x_msgref1, x_msgref2,
    x_msgref3, x_msgref4, x_amlbehavior, x_ownerserviceid, x_correspondentname, x_correspondentaddress1, x_correspondentaddress2, x_correspondentaddress3,
    x_correspondentaddress4, x_correspondentcity, x_correspondentcountry, x_correspondentnetworkaddr, x_tested, x_correspondentnetwork, x_validatedpercentage,
    x_nbofvalid, x_requestref, x_notifqueue, x_requesttype, x_secbpid, x_queue, x_receivercode, x_receiverind, x_validflag, x_ownerid, x_dn, x_rmaourbic,
    x_rmacorrespondentbic, x_rmaservice, x_filemsgref, x_acktext, x_format, x_type, x_mur, x_textetype, x_creatinguser, x_fileinfo, x_company, x_text,
    x_language, x_msgheaders, x_msgtrailer, x_jaxbref, data_GTT_TEMP x_jaxbelt;

    x_memos: = x_memo1 | » -'|| x_memo2 | » -'|| x_memo3 | » -'|| x_memo4;
    x_comments: = x_comment1 | » -'|| x_comment2 | » -'|| x_comment3 | » -'|| x_comment4;
    x_correspondentAddress: = x_correspondentAddress1 | » -'|| x_correspondentAddress2 | » -'|| x_correspondentAddress3 | » -'|| x_correspondentAddress4;
    x_msgrefs: = x_msgRef1 | » -'|| x_msgRef2 | » -'|| x_msgRef3 | » -'|| x_msgRef4;

    BEGIN


    insert into donnees_xml
    (xml_id, x_ext_date, eventtype, amount, currency, State, unit, correspondentid, sender, receivernetworks, bankingpriority, applicationcode,
    ProcessCounter, obsolescence, maxretry, reminders, filesize, endfct, xsubtype, field.20, sequencenumber, requestordn, responderdn,
    swiftnetservice, non repudiation, transfertref, transfertinfo, filedesc, transfertdesc, logicalname, signindicator, critid, infapid,
    deliverynotif, comments, notes, msgseculevel, dates, tuxedopriority, filedest, stkmsgpdeid, emtid, ltrcptsyno, ltrcpt, ltemis, flow,
    FINCopy, msgdateval, eventdate, typereseauid, infapseq1, infapseq2, direction, priority, ack, msgrefs, amlbehavior, ownerserviceid,
    correspondentName correspondentaddress, correspondentcity, correspondentcountry, correspondentnetworkaddr, tested,
    correspondentnetwork, validatedpercentage, nbofvalid, requestref, notifqueue, requesttype, secbpid, xqueue, receivercode,
    receiverind, validflag, ownerid, dn, rmaourbic, rmacorrespondentbic, rmaservice, filemsgref, acktext, format, xtype, wall,
    textetype, creatinguser, fileinfo, society, text, xlanguage, msgheaders, msgtrailer, jaxbref, jaxbelt)
    values
    (xmlid, x_extdate, x_eventType, x_amount, x_currency, x_state, x_units, x_correspondentId, x_sender, x_receiverNetworks, x_bankingPriority, x_applicationCode,
    x_processCounter, x_obsolescence, x_maxRetry, x_retries, x_fileSize, x_endFct, x_subType, x_field20, x_sequenceNumber, x_requestorDn, x_responderDn,
    x_SWIFTNetService, x_nonRepudiation, x_transfertRef, x_transfertInfo, x_fileDesc, x_transfertDesc, x_logicalName, x_signIndicator, x_critId, x_inFapId,
    x_deliveryNotif, x_comments, x_memos, x_msgSecuLevel, x_dates, x_tuxedoPriority, x_fileDest, x_stkMsgPDEId, x_EMTId, x_LTRcptSyno, x_LTRcpt, x_LTEmis, x_flow,
    x_FINCopy, x_msgDateVal, x_eventDate, x_typeReseauId, x_inFapSeq1, x_inFapSeq2, x_direction, x_priority, x_ack, x_msgrefs, x_amlbehavior, x_ownerServiceId,
    x_correspondentName, x_correspondentAddress, x_correspondentCity, x_correspondentCountry, x_correspondentnetworkaddr, x_tested,
    x_correspondentNetwork, x_validatedPercentage, x_nbOfValid, x_requestRef, x_notifQueue, x_requestType, x_secBpid, x_queue, x_receiverCode,
    x_receiverInd, x_validFlag, x_ownerId, x_dn, x_RMAOurBic, x_RMACorrespondentBic, x_RMAService, x_fileMsgRef, ackText, x_format, x_type, x_mur,
    x_TexteType, x_creatingUser, x_fileinfo, x_company d_text, x_language, d_msgHeaders, d_msgTrailer, x_jaxbRef, x_jaxbElt);

    Update temp_XML set status = 'Y' where XML_ID = xmlid;

    END;
    COMMIT;
    END LOOP;
    END;
    /

    1.No. multiple tag will vary how to extract those and concatenate them into a single column. I assumed that his occrrence in 3 for example:

    Use the fn:string-join() function:

    path varchar2 (4000) of comments 'string-join(comments/comment, "-").

    2. how to set the value NULL if no tag is not present. Tag in XML record number can vary.

    You don't have anything specific to do in this case.

    Missing tags with a projection in the COLUMNS clause will produce a column NULL by default.

  • Difference between insertion back-end and front-end insertion into a table.

    I develop a conversion program for the tax exemption. For this program the table ZX_EXEMPTIONS is used to fill the data and we got confirmation from Oracle also in this regard. To insert the data in this table take us the max of tax_exemption_id who is pk for this table and by adding one to it and insert in the table. But the problem here is after the insertion of the back-end that we are not able to insert front end.

    It seems that data backend is the tax_exemption_id which is supposed to reserve front data. Please explain the different behavior of filling of tax_exemption_id of front-end and back-end.

    Hello

    I think the problem is that you do not value max + 1 tax_exemption_id. But as ZX_EXEMPTIONS uses the ZX_EXEMPTIONS_S sequence
    for primary key generation, you encounter the situation as you increase PK Id for this table without increasing the value of the sequence.
    When you try to insert rows from front end - which probably uses the value of the sequence - it tries to use a sequence already used by your backend value
    treat (which he generated by Maxvalue + 1) and then would face a primary key violation.

    I think you need to use the sequence mentioned above for generating your KP login to the backend process. And before that, check the current value
    to ZX_EXEMPTIONS_S, you may need to rebuild the sequence to select nextval successfully for the frontend and backend.

    Concerning

  • reading data from a variable, separated by "|" and insert into the table

    Hi experts,

    I have a file on FTP and I read the file. Now what I have to do is to separate the data and insert them into a table. I have already created the table with the required fields.

    How can I get data from str?

    code below

    declare
    File1 UTL_FILE. TYPE_DE_FICHIER;
    VARCHAR2 (1000) filename: = "GTECHFILES";
    Long str;
    Start
    File1: = UTL_FILE. FOPEN (filename, 'agent_dump_csv.rep', 'r', 32767);
    loop
    UTL_FILE. GET_LINE (File1, str);
    -dbms_output.put_line (' value is :'|| to_char (STR));
    end loop;
    UTL_FILE. FCLOSE (file1);
    exception
    When no_data_found then
    dbms_output.put_line ("END OF FILE");
    UTL_FILE. FCLOSE (file1);
    while others then
    UTL_FILE. FCLOSE (file1);
    dbms_output.put_line (' ERROR: ' |) SQLCODE |': ' | SQLERRM);
    end;

    You must use ' \ [^ |] +' like regexp:

    SQL> create table mytab (a varchar2(20), b varchar2(20), c varchar2(20));
    
    Tabella creata.
    
    SQL> declare
      2  str varchar2(100):= 'qwureer|iftsdfsuif|123134';
      3  begin
      4    insert into mytab
      5      values (regexp_substr(str,'[^|]+',1,1),
      6              regexp_substr(str,'[^|]+',1,2),
      7              regexp_substr(str,'[^|]+',1,3));
      8  end;
      9  /
    
    Procedura PL/SQL completata correttamente.
    
    SQL> select * from mytab;
    
    A                    B                    C
    -------------------- -------------------- --------------------
    qwureer              iftsdfsuif           123134
    

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/01/17/supporto-di-xml-schema-in-oracle-xmldb/]

  • Hi I have a problem of xml with xsd validation and insert into the table...

    I use this function to validate the XML with xsd, but it gives-31000 error related to xdb

    and I also try to recover data from the xml file, but it is fetching nullability of him.

    while I was trying to recover data after removing the tablenamespace, url and other additional field or can tell

    from a simple xml file than it is to get him.

    Please help me with this!

    FUNCTION to CREATE or REPLACE ALI$ XML_VALID (P_xml IN xmltype
    P_xsd IN xmltype)
    RETURN NUMBER
    is


    l_status NUMBER;
    l_xml xmltype.
    l_xsd XMLTYPE.
    l_v_schemaURL VARCHAR2 (256): = "NewBusinessApplication.xsd";
    schema_doesnt_exist exception;
    pragma exception_init (schema_doesnt_exist,-31000);

    BEGIN
    l_xsd: = p_xsd;
    Start
    DBMS_XMLSCHEMA.deleteSchema (l_v_schemaURL, dbms_xmlSchema.DELETE_CASCADE_FORCE);
    exception
    When schema_doesnt_exist then
    null;
    end;

    DBMS_XMLSCHEMA. REGISTERSCHEMA)

    schemaurl = > l_v_schemaURL

    , schemadoc = > l_xsd

    local = > TRUE

    , genTypes = > FALSE

    , genbean = > FALSE

    , genTables = > FALSE

    );
    l_xml: = p_xml;

    If l_xml.isSchemaValid () = 1 then

    dbms_output.put_line ("' scheme is valid");
    l_status: = 1;
    RETURN l_status;
    on the other
    l_xml.schemaValidate ();
    l_status: = 0;
    RETURN l_status;
    end if;
    END;

    -call to above function

    DECLARE

    l_xml xmltype: = xmltype (' <? xml version = "1.0" encoding = "UTF - 8"? >)

    "" < NewBusinessApplication xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"

    "" xsi: schemaLocation = "http://www.example.org NewBusinessApplication.xsd.

    xmlns ="http://www.example.org" > ".

    < TransactionHeader >

    < TR_REF_NO > 000009812681 < / TR_REF_NO >

    < EFF_DT > 20140703094140.572 [-4:US / Eastern] < / EFF_DT >

    < SRC_SYS_CD dmnSRC_SYSTEM = "TSS" > Support of TV system < / SRC_SYS_CD >

    < / TransactionHeader >

    < ApplicationRq >

    < ApplInfo >

    < APPLNO > A00018L < / APPLNO >

    < MED_NONMED dmnMED_NONMED = "M" > medical < / MED_NONMED >

    < APPL_DT > 20140714 < / APPL_DT >

    < EFF_DT > 20140714 < / EFF_DT >

    < APPL_RECV_DT > 20140714 < / APPL_RECV_DT >

    < / ApplInfo >

    < AgentInfo >

    <! – repeat the nodes below for more than one agent - >

    <>Agent

    < AGT_CD > AGN0000001 < / AGT_CD >

    James < FIRSTNAME > < / NAME >

    < NAME > Whorphin < / LASTNAME >

    BKK1010090009 < AGT-LICNO > < / AGT-LICNO >

    the Warriors < TEAM > < / TEAM >

    Suriya Thapa < TEAMLEADER > < / TEAMLEADER >

    BKK909988999 < TEAMLEADER-LICNO > < / TEAMLEADER LICNO >

    < / agent >

    < / AgentInfo >

    < InsuredInfo >

    < dmnPERS_NAMEPREFIX PREFIX-TH = "XX" > Dr. < / PREFIX-TH >

    XXXXXXX < FIRSTNAME-TH > < / FIRSTNAME-TH >

    XXXXXX < MIDNAME-TH > < / MIDNAME-TH >

    XXXXXX < LASTNAME-TH > < / LASTNAME-TH >

    XXXXXX < FORMERNAME > < / FORMERNAME >

    < PREFIX-dmnPERS_NAMEPREFIX-EN = "XX" > Dr. < / PREFIX-EN >

    YYYYYY < FIRSTNAME-EN > < / FIRSTNAME-EN >

    YYYYYY < MIDNAME-EN > < / MIDNAME-FR >

    YYYYYY < LASTNAME-EN > < / LASTNAME-EN >

    < BIRTH_DT > 19800101 < / BIRTH_DT >

    < 33 YEARS > < / AGE >

    < dmnPERNSEXCD = "XX" SEX > male < / TYPE >

    < DmnPERC_MAR_STAT_CD MARITAL_STATUS = "XX" > single < / MARITAL_STATUS >

    < dmnRACE = "XX" RACE > ZZZ < / RACE >

    < dmnRELIGION RELIGION = "H" > HINDU < / RELIGION >

    < dmnNATIONALITY NATIONALITY = an' TH' > THAI < / NATIONALITY >

    < dmnIDTYPE ID-TYPE = "TI" > Thai National ID < / ID-TYPE >

    > ID < AJMPK0001J < / ID >

    < ID-XPIR_DT > 20200101 < / ID-XPIR_DT >

    < dmnOCCUP_CD OCCUPATION = "XX" / >

    < OCCUP_CLASS dmnOCCUP_CLASS_CD = 'XX' / >

    < ANNUAL_INCOME > 100000 < / ANNUAL_INCOME >

    < HEIGHT > 175 < / HEIGHT >

    < WEIGHT > 80 < / WEIGHT >

    < / InsuredInfo >

    < ProposerInfo >

    < dmnPERS_NAMEPREFIX PREFIX-TH = "XX" > Dr. < / PREFIX-TH >

    XXXXXXX < FIRSTNAME-TH > < / FIRSTNAME-TH >

    XXXXXX < MIDNAME-TH > < / MIDNAME-TH >

    XXXXXX < LASTNAME-TH > < / LASTNAME-TH >

    XXXXXX < FORMERNAME > < / FORMERNAME >

    < PREFIX-dmnPERS_NAMEPREFIX-EN = "XX" > Dr. < / PREFIX-EN >

    YYYYYY < FIRSTNAME-EN > < / FIRSTNAME-EN >

    YYYYYY < MIDNAME-EN > < / MIDNAME-FR >

    YYYYYY < LASTNAME-EN > < / LASTNAME-EN >

    < BIRTH_DT > 19800101 < / BIRTH_DT >

    < 33 YEARS > < / AGE >

    < dmnPERNSEXCD = "XX" SEX > male < / TYPE >

    < DmnPERC_MAR_STAT_CD MARITAL_STATUS = "XX" > single < / MARITAL_STATUS >

    < dmnRACE = "XX" RACE > ZZZ < / RACE >

    < dmnRELIGION RELIGION = "H" > HINDU < / RELIGION >

    < dmnNATIONALITY NATIONALITY = an' TH' > THAI < / NATIONALITY >

    < dmnIDTYPE ID_TYPE = "TI" > Thai National ID < / ID_TYPE >

    AJMPK0001J < ID_NUMBER > < / ID_NUMBER >

    < ID_XPIR_DT > 20200101 < / ID_XPIR_DT >

    < dmnOCCUP_CD OCCUPATION = "XX" / >

    < OCCUP_CLASS dmnOCCUP_CLASS_CD = 'XX' / >

    < ANNUAL_INCOME > 100000 < / ANNUAL_INCOME >

    < / ProposerInfo >

    < ContactInfo >

    < AddressInfo >

    <! – repeat the nodes below for each address type - >

    < address >

    < dmnADDR_ADDRTYPE ADDRTYPE = "01" > home < / ADDRTYPE >

    < PRIMARY_CONTACT > 0 < / PRIMARY_CONTACT >

    < / address >

    < address >

    < dmnADDR_ADDRTYPE ADDRTYPE "02" = > Office < / ADDRTYPE >

    < PRIMARY_CONTACT > 1 < / PRIMARY_CONTACT >

    < / address >

    < / AddressInfo >

    < PhoneInfo >

    <! – repeat the nodes below for each type of phone - >

    < Phone >

    < dmnADRP_PHONETYPE PHONETYPE "01" = > Mobile < / PHONETYPE >

    < PHONENUM > 9887666789 < / PHONENUM >

    < PRIMARY_CONTACT > 1 < / PRIMARY_CONTACT >

    < / Phone >

    < Phone >

    < dmnADRP_PHONETYPE PHONETYPE "02" = > home < / PHONETYPE >

    < PHONENUM > 9887666789 < / PHONENUM >

    < PRIMARY_CONTACT > 0 < / PRIMARY_CONTACT >

    < / Phone >

    < / PhoneInfo >

    < EmailInfo >

    <! – repeat the nodes below for each type of email - >

    < email >

    < EMAILTYPE dmnADRO_EMAILTYPE = "01" > e-mail1 < / EMAILTYPE >

    < EMAILDATA > [email protected] < / EMAILDATA >

    < PRIMARY_CONTACT > 0 < / PRIMARY_CONTACT >

    < / email >

    < email >

    < EMAILTYPE dmnADRO_EMAILTYPE "02" = > Email2 < / EMAILTYPE >

    < EMAILDATA > [email protected] < / EMAILDATA >

    < PRIMARY_CONTACT > 1 < / PRIMARY_CONTACT >

    < / email >

    < / EmailInfo >

    < / ContactInfo >

    < PolicyInfo >

    STG102 < BASE-PLAN_CD > < / BASE-PLAN_CD >

    < BASE-PLAN_NM > Smart term 10 gold < / BASE-PLAN_NM >

    < MODEOFPAYMENT dmnZZFREQUENCY = "M" > monthly < / MODEOFPAYMENT >

    < BASE - ITS > 100000.00 < / BASE - SA >

    < BASE-PREMIUM > 12000.00 < / BASE-PREMIUM >

    < BASE-MODALPREMIUM > 1000.00 < / BASE-MODALPREMIUM >

    < AYFP > 13200.00 < / AYFP >

    < RiderInfo >

    < rider >

    RIDER < CODE > ME < / RIDER-CODE >

    Medical costs < RIDER-NAME > < / RIDER-NAME >

    < RIDER - HIS 20000.00 > < / RIDER - SA >

    < RIDER-PREMIUM > 600.00 < / RIDER-PREMIUM >

    < RIDER-MODALPREMIUM > 50.00 < / RIDER-MODALPREMIUM >

    < / rider >

    < rider >

    RIDER HAB < CODE > < / RIDER-CODE >

    < NAME-RIDER > Admission hospitalization < / RIDER-NAME >

    < RIDER - HIS 20000.00 > < / RIDER - SA >

    < RIDER-PREMIUM > 600.00 < / RIDER-PREMIUM >

    < RIDER-MODALPREMIUM > 50.00 < / RIDER-MODALPREMIUM >

    < / rider >

    < / RiderInfo >

    < / PolicyInfo >

    < PaymentInfo >

    < borde >

    < TMP_RECEIPT_NO > TEMP0001 < / TMP_RECEIPT_NO >

    < TOTAL_PYMT_AMT > 13200.00 < / TOTAL_PYMT_AMT >

    <! – repeat the nodes below for payment through several channels - >

    < payment >

    < dmnPAYRTYPE PAYER "01" = > secured < / PAYER >

    credit card < dmnPaymentType PYMT TYPE = "01" > < / PYMT-TYPE >

    < PYMT-AMT > 13200.00 < / PYMT-AMT >

    < PYMT-Channel >

    credit <>card

    Visa < dmnCardType CARD-TYPE = "01" > < / CARD-TYPE >

    < BADGE - N ° > 9890989098909877 < / CARD-NOT >

    < HOLDERNAME-CARD > RICKY WHORPHIN < / CARD-HOLDERNAME >

    < BANKNM-CARD > Standard Chartered Bank < / MAP-BANKNM >

    < MAP SHOWED > 08/14 < / CARD-SHOW >

    < MAP-AUTHCODE / >

    < CARD-AUTHDATE / >

    < / credit card >

    < / PYMT-Channel >

    < / payment >

    < payment >

    < dmnPAYRTYPE PAYER "01" = > secured < / PAYER >

    < dmnPaymentType PYMT-TYPE = '02' > account < / PYMT-TYPE >

    < PYMT-AMT > 13200.00 < / PYMT-AMT >

    < PYMT-Channel >

    < Bank >

    < BANK CODE / >

    < BANK BRANCH / >

    < BANK-ACCNO / >

    < BANK-ACCNAME / >

    < / Bank >

    < / PYMT-Channel >

    < / payment >

    < payment >

    < dmnPAYRTYPE PAYER "01" = > secured < / PAYER >

    < dmnPaymentType PYMT TYPE = "03" > check < / PYMT-TYPE >

    < PYMT-AMT > 13200.00 < / PYMT-AMT >

    < PYMT-Channel >

    < check >

    < CHQ - n / >

    < CHQ-DATE / >

    < CHQ-ISSUEBANK / >

    < / cheque >

    < / PYMT-Channel >

    < / payment >

    < / shell >

    < RenewalPayment >

    < dmnPAYRTYPE PAYER "01" = > secured < / PAYER >

    < DDCHANNEL dmnPaymentType "01" = > SDC < / DDCHANNEL >

    < DDCDetails >

    Visa < dmnCardType CARD-TYPE = "01" > < / CARD-TYPE >

    < BADGE - N ° > 9890989098909877 < / CARD-NOT >

    < HOLDERNAME-CARD > RICKY WHORPHIN < / CARD-HOLDERNAME >

    < BANKNM-CARD > Standard Chartered Bank < / MAP-BANKNM >

    < MAP SHOWED > 08/14 < / CARD-SHOW >

    < / DDCDetails >

    < DDADetails >

    < dmnBNK_TYP_CD BANK-ACCTYPE = "01" > save < / BANK-ACCTYPE >

    < BANK-ACCNO / >

    < BANK-ACCNAME / >

    < BANK BRANCH / >

    < / DDADetails >

    < / RenewalPayment >

    < / PaymentInfo >

    < BeneficiaryInfo >

    <!--repeat the nodes below for each beneficiary and the sum of the pct should be 100-->

    < recipient >

    Joint < dmnBENE_RELT_CD RELATIONSHIP = "01" > < / RELATIONSHIP >

    XXXX < FIRSTNAME > < / NAME >

    XXXXX < MIDNAME > < / MIDNAME >

    XXXX < NAME > < / LASTNAME >

    < PERCENT > 50 < / PERCENTAGE >

    < BIRTH_DT > 19800101 < / BIRTH_DT >

    < dmnPERNSEXCD SEX = "XX" > female < / TYPE >

    < NATLIDNO > TH000001 < / NATLIDNO >

    < / recipients >

    < recipient >

    < dmnBENE_RELT_CD RELATIONSHIP "02" = > child < / RELATIONSHIP >

    XXXX < FIRSTNAME > < / NAME >

    XXXXX < MIDNAME > < / MIDNAME >

    XXXX < NAME > < / LASTNAME >

    < PERCENT > 50 < / PERCENTAGE >

    < BIRTH_DT > 19800101 < / BIRTH_DT >

    < dmnPERNSEXCD = "XX" SEX > male < / TYPE >

    < NATLIDNO > TH000002 < / NATLIDNO >

    < / recipients >

    < / BeneficiaryInfo >

    < survey >

    < HealthDeclaration >

    < question >

    Q001 < QUESTION_ID > < / QUESTION_ID >

    < dmnZZYESNO_NUM RESPONSE = "N" > n < / ANSWER >

    < / question >

    < question >

    Q002 < QUESTION_ID > < / QUESTION_ID >

    < dmnZZYESNO_NUM RESPONSE = "N" > n < / ANSWER >

    < / question >

    < question >

    Q003 < QUESTION_ID > < / QUESTION_ID >

    < dmnZZYESNO_NUM RESPONSE = "N" > n < / ANSWER >

    < / question >

    < question >

    Q004 < QUESTION_ID > < / QUESTION_ID >

    < dmnZZYESNO_NUM RESPONSE = "N" > n < / ANSWER >

    < / question >

    < question >

    Q005 < QUESTION_ID > < / QUESTION_ID >

    < dmnZZYESNO_NUM RESPONSE = "N" > n < / ANSWER >

    < / question >

    < / HealthDeclaration >

    < / questionnaire >

    < / ApplicationRq >

    < ApplicationRs >

    <-reason for the rejection / >

    < / ApplicationRs >

    < / NewBusinessApplication >

    ');

    l_xsd xmltype: = xmltype (' <? xml version = "1.0" encoding = "windows-1252"? >)

    "< xsd: Schema container ="http://www.w3.org/2001/XMLSchema"xmlns ="http://www.example.org"

    targetNamespace ="http://www.example.org" elementFormDefault = "qualified" > "

    < xsd: element name = "NewBusinessApplication" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "TransactionHeader" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "TR_REF_NO" type = "xsd: Integer" / >

    < xsd: element name = "EFF_DT" type = "xsd: String" / >

    < xsd: element name = "SRC_SYS_CD" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnSRC_SYSTEM" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ApplicationRq" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "ApplInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "APPLNO" type = "xsd: String" / >

    < xsd: element name = "MED_NONMED" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnMED_NONMED" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "APPL_DT" type = "xsd: Integer" / >

    < xsd: element name = "EFF_DT" type = "xsd: Integer" / >

    < xsd: element name = "APPL_RECV_DT" type = "xsd: Integer" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "AgentInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "The Agent" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "AGT_CD" type = "xsd: String" / >

    < xsd: element name = "FIRSTNAME" type = "xsd: String" / >

    < xsd: element name = "NAME" type = "xsd: String" / >

    < xsd: element name = "AGT-LICNO" type = "xsd: String" / >

    < xsd: element name = "TEAM" type = "xsd: String" / >

    < xsd: element name = "TEAMLEADER" type = "xsd: String" / >

    < xsd: element name = "TEAMLEADER-LICNO" type = "xsd: String" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "InsuredInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = 'PREFIX-TH' >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERS_NAMEPREFIX" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NAME-TH" type = "xsd: String" / >

    < xsd: element name = "MIDNAME-TH" type = "xsd: String" / >

    < xsd: element name = "LASTNAME-TH" type = "xsd: String" / >

    < xsd: element name = "FORMERNAME" type = "xsd: String" / >

    < xsd: element name = "PREFIX-FR" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERS_NAMEPREFIX-EN" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NAME-IN" type = "xsd: String" / >

    < xsd: element name = "MIDNAME-EN" type = "xsd: String" / >

    < xsd: element name = "LASTNAME-IN" type = "xsd: String" / >

    < xsd: element name = "BIRTH_DT" type = "xsd: Integer" / >

    < xsd: element name = "ÂGE" type = "xsd: Integer" / >

    < xsd: element name = "GENDER" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERNSEXCD" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "MARITAL_STATUS" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERC_MAR_STAT_CD" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "RACE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnRACE" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "RELIGION" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnRELIGION" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NATIONALITY" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnNATIONALITY" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ID-TYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnIDTYPE" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ID" type = "xsd: String" / >

    < xsd: element name = "ID-XPIR_DT" type = "xsd: Integer" / >

    < xsd: element name = "OCCUPATION" >

    < xsd: complexType >

    < xsd: attribute name = "dmnOCCUP_CD" type = "xsd: String" / >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "OCCUP_CLASS" >

    < xsd: complexType >

    < xsd: attribute name = "dmnOCCUP_CLASS_CD" type = "xsd: String" / >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ANNUAL_INCOME" type = "xsd: Integer" / >

    < xsd: element name = "HEIGHT" type = "xsd: Integer" / >

    < xsd: element name = "WEIGHT" type = "xsd: Integer" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ProposerInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = 'PREFIX-TH' >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERS_NAMEPREFIX" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NAME-TH" type = "xsd: String" / >

    < xsd: element name = "MIDNAME-TH" type = "xsd: String" / >

    < xsd: element name = "LASTNAME-TH" type = "xsd: String" / >

    < xsd: element name = "FORMERNAME" type = "xsd: String" / >

    < xsd: element name = "PREFIX-FR" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERS_NAMEPREFIX-EN" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NAME-IN" type = "xsd: String" / >

    < xsd: element name = "MIDNAME-EN" type = "xsd: String" / >

    < xsd: element name = "LASTNAME-IN" type = "xsd: String" / >

    < xsd: element name = "BIRTH_DT" type = "xsd: Integer" / >

    < xsd: element name = "ÂGE" type = "xsd: Integer" / >

    < xsd: element name = "GENDER" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERNSEXCD" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "MARITAL_STATUS" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERC_MAR_STAT_CD" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "RACE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnRACE" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "RELIGION" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnRELIGION" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NATIONALITY" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnNATIONALITY" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ID_TYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnIDTYPE" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ID_NUMBER" type = "xsd: String" / >

    < xsd: element name = "ID_XPIR_DT" type = "xsd: Integer" / >

    < xsd: element name = "OCCUPATION" >

    < xsd: complexType >

    < xsd: attribute name = "dmnOCCUP_CD" type = "xsd: String" / >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "OCCUP_CLASS" >

    < xsd: complexType >

    < xsd: attribute name = "dmnOCCUP_CLASS_CD" type = "xsd: String" / >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ANNUAL_INCOME" type = "xsd: Integer" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ContactInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "AddressInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Address" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "ADDRTYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnADDR_ADDRTYPE" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "PRIMARY_CONTACT" type = "xsd: Integer" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "PhoneInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Phone" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "PHONETYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnADRP_PHONETYPE" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "PHONENUM" type = "xsd: Integer" / >

    < xsd: element name = "PRIMARY_CONTACT" type = "xsd: Integer" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "EmailInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Email" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "EMAILTYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnADRO_EMAILTYPE" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "EMAILDATA" type = "xsd: String" / >

    < xsd: element name = "PRIMARY_CONTACT" type = "xsd: Integer" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "PolicyInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "BASE-PLAN_CD" type = "xsd: String" / >

    < xsd: element name = "BASE-PLAN_NM" type = "xsd: String" / >

    < xsd: element name = "MODEOFPAYMENT" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnZZFREQUENCY" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "BASE - SA" type = "xsd: float" / >

    < xsd: element name = "BASE-PREMIUM" type = "xsd: float" / >

    < xsd: element name = "BASE-MODALPREMIUM" type = "xsd: float" / >

    < xsd: element name = "AYFP" type = "xsd: float" / >

    < xsd: element name = "RiderInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Rider" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "RIDER-CODE" type = "xsd: String" / >

    < xsd: element name = "RIDER-NAME" type = "xsd: String" / >

    < xsd: element name = "RIDER - SA" type = "xsd: float" / >

    < xsd: element name = "RIDER-PREMIUM" type = "xsd: float" / >

    < xsd: element name = "RIDER-MODALPREMIUM" type = "xsd: float" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "PaymentInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Bordered" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "TMP_RECEIPT_NO" type = "xsd: String" / >

    < xsd: element name = "TOTAL_PYMT_AMT" type = "xsd: float" / >

    < xsd: element name = "Payment" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "PAYER" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPAYRTYPE" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "TYPE PYMT" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPaymentType" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "PYMT-AMT" type = "xsd: float" / >

    < xsd: element name = "PYMT-Channel" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "CreditCard" minOccurs = "0" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "CARD TYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnCardType" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "CARD-NO" type = "xsd: Integer" / >

    < xsd: element name = "CARD-HOLDERNAME" type = "xsd: String" / >

    < xsd: element name = "CARD-BANKNM" type = "xsd: String" / >

    < xsd: element name = "CARD-DISPLAYED" type = "xsd: String" / >

    < xsd: element name = "CARD-AUTHCODE" / >

    < xsd: element name = "CARD-AUTHDATE" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "Bank" minOccurs = "0" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "BANK CODE" / >

    < xsd: element name = "BANK-BRANCH" / >

    < xsd: element name = "BANK-ACCNO" / >

    < xsd: element name = "BANK-ACCNAME" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "Cheque" minOccurs = "0" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "CHQ - NO" / >

    < xsd: element name = "CHQ-DATE" / >

    < xsd: element name = "CHQ-ISSUEBANK" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "RenewalPayment" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "PAYER" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPAYRTYPE" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "DDCHANNEL" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPaymentType" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "DDCDetails" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "CARD TYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnCardType" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "CARD-NO" type = "xsd: Integer" / >

    < xsd: element name = "CARD-HOLDERNAME" type = "xsd: String" / >

    < xsd: element name = "CARD-BANKNM" type = "xsd: String" / >

    < xsd: element name = "CARD-DISPLAYED" type = "xsd: String" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "DDADetails" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "BANK-ACCTYPE" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnBNK_TYP_CD" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "BANK-ACCNO" / >

    < xsd: element name = "BANK-ACCNAME" / >

    < xsd: element name = "BANK-BRANCH" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "BeneficiaryInfo" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Recipient" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "RELATIONSHIP" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnBENE_RELT_CD" type = "xsd: Integer" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "FIRSTNAME" type = "xsd: String" / >

    < xsd: element name = "MIDNAME" type = "xsd: String" / >

    < xsd: element name = "NAME" type = "xsd: String" / >

    < xsd: element name = "PERCENTAGE" type = "xsd: Integer" / >

    < xsd: element name = "BIRTH_DT" type = "xsd: Integer" / >

    < xsd: element name = "GENDER" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnPERNSEXCD" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "NATLIDNO" type = "xsd: String" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "Questionnaire" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "HealthDeclaration" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Issue" maxOccurs = "unbounded" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "QUESTION_ID" type = "xsd: String" / >

    < xsd: element name = "ANSWER" >

    < xsd: complexType >

    < xsd:simpleContent >

    < xsd:extension base = "XSD: String" >

    < xsd: attribute name = "dmnZZYESNO_NUM" type = "xsd: String" / >

    < / xsd:extension >

    < / xsd:simpleContent >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < xsd: element name = "ApplicationRs" >

    < xsd: complexType >

    < xsd: SEQUENCE >

    < xsd: element name = "Reason for rejection" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: SEQUENCE >

    < xsd: attribute name = "xsi" type = "xsd: String" / >

    < xsd: attribute name = "schemaLocation" type = "xsd: String" / >

    < / xsd: complexType >

    < / xsd: element >

    < / xsd: Schema >

    ');

    BEGIN

    dbms_output.put_line (Ali$ XML_VALID (l_xml, l_xsd));

    END;

    and please do not confused, you don't need to answer if I do not any sense.

    BUT I STILL HAVE ONE LAST QUESTION

    do you know how to use namespaces in the exctractvalue().

    I'm not "troubled", just frustrated that you don't seem to understand what I've explained so far.

    Why do you insist on the use of extractvalue? Don't use extractvalue, it is deprecated, use XMLTABLE instead.

    If you feel compelled to use extractvalue of certain grounds, just the curiosity to seek it in the documentation, you can find the syntax to use the namespaces:

    http://docs.Oracle.com/CD/E11882_01/server.112/e41084/functions061.htm#SQLRF06173

    in your last code, you first insert the XML and extract data from it. I can do it too, but it's not my requirement. I'm supposed to read the first xml (if it is valid) as I do in my code using the table function and make the continuation of the procedure.

    Look, I'll ask you one last time:

    What problem are you having? What prevents you from first reading, certain values before inserting, as you need. Just use the same query XMLTABLE that I showed in my example, except you will not query the table, but directly from the XMLType variable:

    PASSAGE v_xml

    COLUMNS...

  • insert into the table using the loop and permanently display

    Hello

    I am trying to insert some values of loop loop run into two tables and trying to draw using Graph XY. I need values Joanie be inserted one by one in each iteration. But at the end of the iteration in the table, I get only last value... can someone help me?

    Hello Manu,

    use a shift register to store each table. BuildArray allows to add/Add (not Insert!) of new values in the table.

    Then you need not use an ExpressVI to create the chart, a knot simple bundle (as indicated in the context-sensitive help) is enough to create a field in a XY Chart...

    Example with a table:

    Keep in mind:

    It's not (memory/CPU time) effective to use for time of data acquisition time (giving rise to large Bay). Use different approaches then...

  • Attempt to create run time (dynamic) table and insert the data in this... The entrance is a flat file (txt file) which has the numbers and strings... I'm trying to convert them to a string and insert into the table. It is a matter of urgency for me please

    create or replace procedure Dynamic_Table AS

    iVal VARCHAR2 (32);

    iTemp varchar (200): = ";

    sql_stmt VARCHAR2 (200);

    l_file1 UTL_FILE. TYPE_DE_FICHIER;

    l_file utl_file.file_type;

    BEGIN

    l_file1: = UTL_FILE. FOPEN ('TEST', 'dinput.txt', 'R');

    EXECUTE IMMEDIATE ' CREATE TABLE baseline (Item_ID varchar2 (32))';

    Loop

    BEGIN

    UTL_FILE. GET_LINE (l_file1, iVal);

    EXECUTE IMMEDIATE ' insert into baseline values (: ival) "using ival;

    EXCEPTION

    WHEN No_Data_Found THEN EXIT;

    While some OTHER THEN dbms_output.put_line (SQLERRM); * /

    END;

    end loop;

    END;

    You are approaching this the wrong way.  Create an external table based on the file.  External tables are CSV, fixed width data in a queryable table.

    You will need to create an oracle directory to put the file in (MY_ORA_DIR) I leave it for you to do, and then perform the following...

    create table BASELINE)

    ITEM_ID varchar2 (32)

    )

    EXTERNAL ORGANIZATION

    (

    TYPE ORACLE_LOADER

    THE DEFAULT DIRECTORY MY_ORA_DIR

    ACCESS SETTINGS

    (

    RECORDS DELIMITED BY NEWLINE

    LOGFILE "dinput.log".

    BADFILE "dinput.bad."

    NODISCARDFILE

    FIELDS

    (

    ITEM_ID

    )

    )

    LOCATION ("dinput.txt")

    )

    REJECT LIMIT UNLIMITED

    /

    All the dubious records appear in dinput.bad. Dinput.log will give you information.

    External tables are read-only, so once you set up your file, you can create editable as a normal table.

    create table ITABLE_EDITABLE as

    Select * from BASELINE

    /

    Work done, a few lines of code.

  • Parse XML and insert into the table Oracel

    Hi all

    I have an XML document, I need to analyze and take the respective tag data and inserting it into another table.

    This is the XML code that I have.

    " < convertTo xsi: schemaLocation =" https://xecdapi.XE.com/schema/v1/convertTo.xsd "> "

    < terms > http://www.XE.com/privacy.php < / terms >

    < privacy > http://www.XE.com/legal/DFS.php < / privacy >

    < to > < /pour > USD

    < amount > 1.0 < / amount >

    < timestamp > 2015-10-25T 23: 00:00Z < / timestamp >

    < from >

    rate <>

    < currency > EUR < / currency >

    < e > 0.9075541422 < / mid >

    < / rates >

    rate <>

    INR < currency > < / currency >

    < e > 65.0313451105 < / mid >

    < / rates >

    rate <>

    < currency > CAD < / currency >

    < e > 1.3167560135 < / mid >

    < / rates >

    rate <>

    < currency > GBP < / currency >

    < e > 0.6528693249 < / mid >

    < / rates >

    < / from >

    < / convertTo >


    Here is the code I use to analyze the values

    DECLARE

    XMLType x: = XMLType)

    ' ' < convertTo xsi: schemaLocation = " https://xecdapi.XE.com/schema/v1/convertTo.xsd "> "

    < terms > http://www.XE.com/privacy.php < / terms >

    < privacy > http://www.XE.com/legal/DFS.php < / privacy >

    < to > < /pour > USD

    < amount > 1.0 < / amount >

    < timestamp > 2015-10-25T 23: 00:00Z < / timestamp >

    < from >

    rate <>

    < currency > EUR < / currency >

    < e > 0.9075541422 < / mid >

    < / rates >

    rate <>

    INR < currency > < / currency >

    < e > 65.0313451105 < / mid >

    < / rates >

    rate <>

    < currency > CAD < / currency >

    < e > 1.3167560135 < / mid >

    < / rates >

    rate <>

    < currency > GBP < / currency >

    < e > 0.6528693249 < / mid >

    < / rates >

    < / from >

    < / convertTo > '

    );

    BEGIN

    FOR r IN

    (

    SELECT

    Name of the AS ExtractValue (Value (p),'/ rate/currency/text () ')

    -, ExtractValue (value (p), '/ Row/Address/State/Text ()') State

    -, ExtractValue (value (p), '/ Row/Address/City/Text ()') city

    Of

    TABLE (XMLSequence (Extract(x,'convertTo/from/rate'))) p

    )

    LOOP

    -do what you want with r.name, r.state, r.city

    dbms_output.put_line ('Name' | r.Name);

    END LOOP;

    END;

    I get the error message below

    Error report:

    ORA-31011: XML parsing failed

    ORA-19202: an error has occurred in the processing of XML

    LPX-00234: the 'xsi' namespace prefix is not declared

    Error on line 1

    ORA-06512: at "SYS." XMLTYPE", line 310

    ORA-06512: at line 2

    31011 00000 - "XML parsing failed"

    * Cause: XML parser returned an error trying to parse the document.

    * Action: Check whether the document to parse is valid.

    Any help on how to fix this would be really useful.

    Appreciate your time and your help.

    Thank you

    Olivier

    Have you even tried to do what we have suggested?

    SQL > ed
    A written file afiedt.buf

    1 with t as (select xmltype ('))
    "" 2 http://xecdapi.xe.com "xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance"" xsi: schemaLocation = "https://xecdapi.xe.com/schema/v1/convertTo.xsd" > ""
    3 http://www.xe.com/privacy.php
    4 http://www.xe.com/legal/dfs.php
    5 USD
    6    1.0
    7 2015-10 - 25 T 23: 00:00Z
    8
    9
    10 EUROS
    11 0.9075541422
    12

    13

    14
    ") in XML of the double)"
    15-
    16 end of test data
    17-
    18 select x.*
    19 t
    20, xmltable (xmlnamespaces ("http://www.w3.org/2001/XMLSchema-instance" as "xsi", default 'http://xecdapi.xe.com'),)
    21 ' / convertTo/of/rate.
    22 passage t.xml
    path of VARCHAR2 (3) currency 23 columns '. / currency '
    24, half-way number '. / mid'
    25*                ) x
    SQL > /.
    HEART MI
    --- ----------
    EUR.907554142

    1 selected line.

  • Use the trigger and seq to insert into 2 tables

    I created a sequence.

    I have 2 tables

    I want a trigger that when I insert in the 1 table inserts the sequence number nextval, that is no problem, but also is there a way so that once that happens it also inserts this same value of sequence in another table.

    So the end result is a new record in the table has the seq value and a new record in table b with the same value of seq (and the rest of the fields blank)

    Thanks for any help

    Could do:

    SQL > create the sequence myseq;

    Order of creation.

    SQL > drop table t2 is serving;

    Deleted table.

    SQL > drop table t1 is serving;

    Deleted table.

    SQL > create table t1 (collar number);

    Table created.

    SQL > create table t2 (collar number);

    Table created.

    SQL > create or replace trigger mytrig

    2 before the Insert on t1

    3 for each line

    4 start

    case 5: new.col is null

    6. can

    7: new.col: = myseq.nextval;

    8 insert into t2 (col)

    9. Select myseq.currval

    10 double;

    11 end if;

    12 end;

    13.

    Trigger created.

    SQL > insert into values (null), t1 (col);

    1 line of creation.

    SQL > select * from t1;

    COL

    ----------

    1

    1 selected line.

    SQL > select * from t2;

    COL

    ----------

    1

    1 selected line.

  • Divide the value and insert into the table

    create table mytab (a tank (25), b Varchar2 (50), Varchar2 (100)) C;

    I have a string like

    myStr:'A$bggoy#qwewewee@A$Qwe#zcxdf@A$po#xvcvxc@A$sdmy#sfdsdf @'

    I need to divide and insert into mytab

    That's what I tried

    declare p_str varchar2 (4000)

    Begin

    long l_str p_str default. '$';

    number of l_n;

    myTableType l_data: = myTabletype();

    Start

    loop

    l_n: = instr (l_str, ",");

    When the output (nvl(l_n,0) = 0);

    l_data.extend;

    l_data (l_data.count): =.

    LTRIM (rtrim (substr (l_str, 1, l_n - 1)));

    l_str: = substr (l_str, l_n + 1);

    -Connect mytab

    end loop;

    end;

    Shows below inf-s:

    describe the OBJ_SPLIT ;

    recreate

    CREATE OR REPLACE TYPE OBJ_SPLIT_table IS TABLE OF OBJ_SPLIT;

    to view the result of the compilation

    CREATE OR REPLACE Function Fn_get_split (P_str VARCHAR2)

    return OBJ_SPLIT_table

    PIPELINED is type t_ref_cursor IS REF CURSOR;

    rf_c t_ref_cursor;

    r_out_rec OBJ_SPLIT: = OBJ_SPLIT (null, null, null, null);

    Begin

    Open the rf_c for

    Select s,.

    REGEXP_SUBSTR (str, ' [^ $] +', 1, 1) s1,

    REGEXP_SUBSTR (str, ' [^ $#] +', 1, 2) s2,.

    REGEXP_SUBSTR (str, ' [^ $#] +' 1, 3) s3

    from (select s, REGEXP_SUBSTR (s, "[^ @] +', 1, rownum") str)

    (select s P_str of double)

    connect by instr (s, ' @', 1, level - 1) > 0)

    where str is not null;

    LOOP

    EXTRACTION rf_c

    IN

    r_out_rec. Str,

    r_out_rec. Delimter1,

    r_out_rec. Delimter2,

    r_out_rec. Delimter3;

    EXIT WHEN rf_c % NOTFOUND;

    PIPE ROW (r_out_rec);

    END LOOP;

    CLOSE Rf_c;

    end;

    and the result

    Select DELIMTER1, DELIMTER2, table DELIMTER3 (Fn_get_split('A$bggoy#qwewewee@A$qwe#zcxdf@A$po#xvcvxc@A$sdmy#sfdsdf@'));

    in SQLPLUS


    ----

    Ramin Hashimzade

  • Popup do not insert in the table and not refreshing called page...

    Greetings



    Environment: APEX 3.1.1.00.09 on AIX 5.3 with 10 gr 2



    I read a lot of threads about my question and I think I'm getting closer to the answer but in some sort have combined a too big number of suggestions and am tripping over my own code.



    Please look at my sample application on apex.oracle.com:



    Workspace: galway

    User: gwicke

    Password: gwicke



    Please start by Page3, select any agency and then click on "add a new contract."

    There are currently a label "BOLD" < facilities > < strong > 'Add new Builder' which is a link that should open a popup window. Type a name in the field, and then click 'Create Builder'. This should INSERT the row into the table builder, close the pop-up window, assign the new name of the generator to the item page calling "Name Builder" and fill the screen element.



    In current state, the application will open the pop-up, allow entry and close by clicking on the button "create Builder." However, the new constructor is NOT inserted into the table and the calling page element is not met.



    Looking at the Page elements and Session State, I can see the correct values assigned to the elements "Pn_BULDER_NAME" on the popup page (4) and the calling page (2), but the value does not appear on the screen.



    I read here where there really two parallel universes, not forgiveness, Articles of two versions of the screen, a State of Session and the other which is displayed in the browser and there are measures to be taken to be sure that is displayed is updated to state of Session I want in this case.



    I entered the Javascript code on Page4 - header to set the 'passBack2()' function and the code in the section "Option URL Redirect" to the button "Add Builder" if all goes well perform protocol ARP for the INSERT, assign items to page 2 and close the pop-up window. He gets not quite everything.



    Any helpp is greatly appreciated. Thanks to Dene for most of the suggestions I have followed by code.



    -gary

    Hi Gary,.

    I think that there is a very simple solution to this topic - is not this spot really last night.

    First, Yes, you could use a "button" to manage the call for the popup - make sure that the button is a type of URL 'button', which is actually an A tag with the appeal under target URL. Otherwise, you could take you existing a tag and use the same class for one of your buttons attribute because this should make it look like a button.

    More importantly, however, I think we could do as:

    1. on your call popup page 2, clear cache for page 4 (the popup page) - I already did in your application by updating the url

    2. on page popup, allow the user to enter their desired P4_BUILDER_NAME value (not sure if you want to do something to make it unique?)

    3 let the user click on create on the shortcut menu. He will submit the page, that will make your P4_BUILDER_RANK (pk) value and insert a new record in the table (you might consider the creation of a sequence and a trigger to handle the creation of new value PK?).

    4 - assuming that the P4_BUILDER_RANK then exist (it would not if there is a mistake somewhere), then conditionally display a region that had a piece of javascript submit page 2 and closes then itself - we don't need to move everything back to page 2 (see below)

    5. as the P4_BUILDER_NAME and the P4_BUILDER_RANK exist in the session, to which page 2 be reloaded, (A) the selection list should be updated with the new generator (still not sure why all my entries appeared downstairs instead of in alphabetical?) and (B) the P2_BUILDER_NAME and the P2_BUILDER_RANK can have Post calculation calculations together (NVL) ((: P4_BUILDER_NAME,: P2_BUILDER_NAME) and NVL (: P4_BUILDER_RANK,: P2_BUILDER_RANK) respectively)-l' effect is, if there are the values stored in the page P4 elements, we use them, otherwise, we use whatever values were in the elements of page P2

    6 - Finally, to stop (5) that happens in all the loading of page 2, you would need to clear the cache of page 4 in as many places as possible - for example, branches for a 2 page or buttons on page 2

    The reason why we cannot pass values back to page 2, it is one of the elements is a list of selection. The value we want to select will appear not on the selection list until the page has been sent. So, we can set the value and submit because the value is not there. We can introduce and define the value, because the javascript don't know when the page has been updated (or, at least, you need an independent mechanism to identify, which can get complicated).

    So, in other words, as long as we know that if the values are in the session, we can use Post calculation calculations to set our fields to these values. The only thing to keep in mind is that we must ensure that these session values only exist when in need - so we empty the cache. This principle should work for any type of terrain - but as you have no doubt seen, simple text fields can be updated by the popup directly as the field must accept any value that we give.

    My only recommendation would be to completely remove the MRU of the page process because they are not necessary (they simply confuse the issue) and you could make your fetch PK and record insert into a single process - just to keep things clean and tidy, you understand!

    When I finished last night with your app, I will leave so that javascript can create an option on the select list, and then set the value. But the method described above seems to be much simpler.

    Andy

  • No related video and audio when using a sequence of nest in the source Panel and try to insert a clip in the timeline

    When I use a sequence of nest in the source Panel and try to insert a clip in the timeline, the video and audio are not related. Before this update (2015.1), I did not have this problem.

    Issue.png

    Hi Daniel,.

    I can confirm this matter and will get a logged bug. It is a pain, but after having been published in the sequence, select the audio and video components, right click and select 'Link' to link the components between them. Sorry for the inconvenience.

    Colin

    First Pro EQ

  • When I try to use the Snipping Tool I get a message saying that "the capture tool doesn't on your computer right now. Restart your computer and try again. If the problem persists, contact your system administer. "__What I can do to fix this? __Thanks

    When I try to use the Snipping Tool I get a message saying that "the capture tool doesn't on your computer right now. Restart your computer and try again. If the problem persists, contact your system administer. »
    What can I do to fix this?
    Thank you

    Hi Palaimo,

    See if one of the patches in the following link works for you.

    Snipping Tool fails

    Ramesh Srinivasan, Microsoft MVP [Windows Desktop Experience]

  • a loop data and insert into another table fail

    HI EVEYONE,
    I'm new in PL/SQL and apply to develop, which I intend to extract data from PDF directly to the oracle database by looking at its difficulty that I changed the approach of the first extraction of my data to flat file and then convert Excel CSV format that makes it easier for me to handle in my oracle database.
    The challenge I'm having here is that
    The column id_number is a mixture of 3 identifications
    One for the facility, which has the form (YEAR/0145)
    The second is for participant with the form (* 01934764 *)
    And the last identification is for dependants with the form (0, 1, 2, 3, 4, 5)
    As shown below
    ID_Number status name
    YEAR/0145
    * 01934764 * MUOKA
    MUOKA main 0
    1 joint MUOKA
    Child2 3 MUOKA
    * 01934769 * TSILIA
    JOEL main 0
    1 joint TSILIA
    2 Child1 TSILIA
    3 Child2 TSILIA
    4 Child3 TSILIA
    5 child4 TSILIA
    * 02216419 * OKOLO
    OKOLO main 0
    1 joint OKOLO
    2 Child1 OKOLO
    3 Child2 OKOLO
    4 Child3 OKOLO
    YEAR/0145
    EZEOKOLI main 0
    1 joint EZEOKOLI
    YEAR/0171
    * 01580118 * ABDOU
    Main 0 ABDOU
    1 joint ABDOU
    2 Child1 ABDOU
    3 Child2 ABDOU
    4 Child3 ABDOU
    5 child4 ABDOU
    BA/0003
    * 00992897 * BAKARI
    BAKARI main 0
    1 joint BAKARI
    BA/0004
    * 00992011 * MAINA
    MAINA main 0
    1 joint MAINA
    2 Child1 MAINA
    3 Child2 MAINA
    4 MARCO Child3
    5 child4 MAINA
    My goal is to separate facilities, participants and beneficiaries so that questioning, I can easily identify a participant and its beneficiaries is under a given installation, so I developed this code.
    create or replace procedure my_new
    is
    cursor c1 is
    Select *.
    the registry
    where id_number like "% / %" or id_number like ' * % *' or id_number in ('0', '1', '2', '3', '4',' 5');

    vNhis register.id_number%TYPE: = NULL;
    vNhis1 register.id_number%TYPE: = NULL;

    Start
    I'm in c1
    loop

    If i.id_number like "% / %".
    then
    vNhis: = i.id_number;

    on the other
    vNhis1: = i.id_number;
    dbms_output.put_line(vNhis||) e '|| vNhis1);


    -loop
    -insert into new_REGISTER (FACILITY_CODE, ID_NUMBER)
    -values (vNhis, vNhis1);
    -commit;
    -end loop;
    end if;

    end loop;
    end;
    It gives me a good quick result as shown below
    YEAR/0145 * 01934764 *.
    YEAR/0145 0
    1 YEAR/0145
    3 YEAR/0145
    YEAR/0145 * 01934769 *.
    YEAR/0145 0
    1 YEAR/0145
    2 YEAR/0145
    3 YEAR/0145
    4 YEAR/0145
    5 YEAR/0145
    YEAR/0145 * 02216419 *.
    YEAR/0145 0
    1 YEAR/0145
    2 YEAR/0145
    3 YEAR/0145
    4 YEAR/0145
    YEAR/0145 0
    1 YEAR/0145
    YEAR/0171 * 01580118 *.
    YEAR/0171 0
    1 YEAR/0171
    2 YEAR/0171
    3 YEAR/0171
    4 YEAR/0171
    5 YEAR/0171
    BA/0003 * 00992897 *.
    BA/0003 0
    BA/0003 1
    BA/0004 * 00992011 *.
    BA/0004 0
    BA/0004 1
    BA/0004 2
    BA/0004 3
    BA/0004 4
    BA/0004 5





    But uncommenting to insert into the newly created table new_register table it is to say this part of the code
    Loop
    Insert in the REGISTER (FACILITY_CODE, NHIS_NUMBER)
    values (vNhis, vNhis1);
    commit;
    end loop;
    end if;

    It took all day to run for the first time and subsequent tests fail to run with my hanging of database. any help on this is appreciated
    Thanks to you all.

    It is slow because you do a lot of change between the SQL and PL/SQL engine with inserts all looped and individual context etc.

    What you need to do is to treat the external table (CSV file) data in a single SQL statement example

    SQL> select id1, id2
      2  from (
      3        select case when id1 is not null then id1 else last_value(id1 ignore nulls) over (order by rn) end as id1
      4              ,id2
      5              ,rn
      6        from (
      7              select rownum as rn
      8                    ,case when id_number like '%/%' then id_number else null end as id1
      9                    ,case when id_number not like '%/%' then id_number else null end id2
     10              from ext_test
     11             )
     12       )
     13  where id2 is not null
     14  order by rn;
    
    ID1                  ID2
    -------------------- --------------------
    AN/0145              *01934764*
    AN/0145              0
    AN/0145              1
    AN/0145              3
    AN/0145              *01934769*
    AN/0145              0
    AN/0145              1
    AN/0145              2
    AN/0145              3
    AN/0145              4
    AN/0145              5
    AN/0145              *02216419*
    AN/0145              0
    AN/0145              1
    AN/0145              2
    AN/0145              3
    AN/0145              4
    AN/0145              0
    AN/0145              1
    AN/0171              *01580118*
    AN/0171              0
    AN/0171              1
    AN/0171              2
    AN/0171              3
    AN/0171              4
    AN/0171              5
    BA/0003              *00992897*
    BA/0003              0
    BA/0003              1
    BA/0004              *00992011*
    BA/0004              0
    BA/0004              1
    BA/0004              2
    BA/0004              3
    BA/0004              4
    BA/0004              5
    
    36 rows selected.
    
  • Occult video BIOS BIOS occult system and I cannot get into the bios?

    IT SAYS: System hidden BIOS Video BIOS with a shadow and I cannot get into the bios?  WHAT CAN I DO

    Hello

    Why you try to go into the BIOS (Basic Input Output System)?

    For the problem with the BIOS (Basic Input Output System), I recommend you contact the manufacturer of your computer for help.

    Note: Changing the BIOS / chipset can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the configuration of the BIOS/chipset can be solved. Changes to settings are at your own risk.

    Hope the helps of information.

Maybe you are looking for

  • won't let me restore my 5s? any help would be appreciated

    I'm tryin to restore my 5s... but he does not terminate restyoring and custom boot the phone? any need help

  • passing value change of timeout

    Hello need help... I have a button wic radio replace the text arrouding in the time-out period. If the text is 0 = the radio button value will be b = 1 If the text is 5 = the radio button value will be b = 2 and so on... in this State... say to my wh

  • PhotoSmart 2610

    How can I get printer PhotoSmart 2610 to scan to a pdf file?   When I got the new computer (Windows 7) I had more icon that showed scanning, fax, to cope.  I need to copy a document to word.  Thanks for any help you can give.

  • Dual display for Pavilion Elite HPE - 580 t with NVIDIA GeForce GT 420

    recently bought Pavilion 580t for my wife. Updated to NVIDIA GeForce GT 420 map graphics. But there are currently not able to determine if it supports dual display. When you check the Nvidia site, he says that all the stuff here. But this has only a

  • Blue screen of death analysis guide

    This guide is intended to help an end user to analyse and understand what may have caused their computers to break and cause a blue screen of death. This guide is an information guide and help you to analyze and try to find what caused the crash and