XML DATA INSERTION INTO TABLE

I have xml data in this format and need to store in the lineitem table by generating three new values for each row ie line identifier(sys_guid),begin_date and end_date.
<LineItems>
<LineItem>
<BASE_TYPE>SRV</BASE_TYPE>
<ORDER_NUM>124089304</ORDER_NUM>
<WIP_STATUS>S</WIP_STATUS>
<WIP_STATUS_DATE>8/1/2006 8:44:55 PM</WIP_STATUS_DATE>
<order_date>6/21/2006 12:00:00 AM</order_date>
<IP_DATE>6/21/2006 12:00:00 AM</IP_DATE>
</LineItem>
<LineItem>
<BASE_TYPE>SRV</BASE_TYPE>
<ORDER_NUM>124089304</ORDER_NUM>
<WIP_STATUS>S</WIP_STATUS>
<WIP_STATUS_DATE>8/1/2006 8:44:55 PM</WIP_STATUS_DATE>
<order_date>6/21/2006 12:00:00 AM</order_date>
<IP_DATE>6/21/2006 12:00:00 AM</IP_DATE>
</LineItem>
</LineItems>
and using this method to insert
SELECT EXTRACTVALUE(VALUE(T), 'LineItem/BASE_TYPE'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_NUM'),
EXTRACTVALUE(VALUE(T), 'LineItem/WIP_STATUS'),
EXTRACTVALUE(VALUE(T), 'LineItem/WIP_STATUS_DATE')),
EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_DATE')),
EXTRACTVALUE(VALUE(T), 'LineItem/IP_DATE')),
EXTRACTVALUE(VALUE(T), 'LineItem/SHIP_BY_DATE')),
EXTRACTVALUE(VALUE(T), 'LineItem/CUSTOMER_SRC'),
EXTRACTVALUE(VALUE(T), 'LineItem/CUSTOMER_LOC'),
EXTRACTVALUE(VALUE(T), 'LineItem/CUSTOMER_NUM'),
EXTRACTVALUE(VALUE(T), 'LineItem/ACCOUNT_TYPE'),
EXTRACTVALUE(VALUE(T), 'LineItem/OVERPACK_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/INTERNATIONAL_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/MULTIPLE_SYSTEM_TIES'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_TIE_NUM'),
EXTRACTVALUE(VALUE(T), 'LineItem/TIE_STATUS'),
EXTRACTVALUE(VALUE(T), 'LineItem/PK_GEN'),
EXTRACTVALUE(VALUE(T), 'LineItem/QTY_REQD'),
EXTRACTVALUE(VALUE(T), 'LineItem/WORKCENTER_ID'),
EXTRACTVALUE(VALUE(T), 'LineItem/SI_NUMBER'),
EXTRACTVALUE(VALUE(T), 'LineItem/MFG_SCHED_FACILITY_ID'),
EXTRACTVALUE(VALUE(T), 'LineItem/MFG_FACILITY_ID'),
EXTRACTVALUE(VALUE(T), 'LineItem/PILOT_NAME'),
EXTRACTVALUE(VALUE(T), 'LineItem/ENG_HOLD_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/SHORT_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/OVR_SHORTAGE'),
EXTRACTVALUE(VALUE(T), 'LineItem/USER_HOLD_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/SHIP_TO_ADDRESS_SEQ_NUM'),
EXTRACTVALUE(VALUE(T), 'LineItem/CALICO_REF_NUM'),
EXTRACTVALUE(VALUE(T), 'LineItem/CONFIG_ID'),
EXTRACTVALUE(VALUE(T), 'LineItem/TOTAL_UNITS_QTY'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_TYPE'),
EXTRACTVALUE(VALUE(T), 'LineItem/SKU'),
EXTRACTVALUE(VALUE(T), 'LineItem/SUB_ASSEMBLY_NUMBER'),
EXTRACTVALUE(VALUE(T), 'LineItem/BASE_ASM_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/QTY_REQ'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORIGINAL_PART_NUMBER'),
EXTRACTVALUE(VALUE(T), 'LineItem/SUBSTITUTE_PART_NUMBER'),
EXTRACTVALUE(VALUE(T), 'LineItem/QTY_EXTENDED'),
EXTRACTVALUE(VALUE(T), 'LineItem/ISSUE_CODE'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_PART_DESC'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_COMMODITY_CODE'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_PRINT_ON_TRAVELER_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_BOX_CODE'),
EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_PART_DESC'),
EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_COMMODITY_CODE'),
EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_PRINT_ON_TRAVELER_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_BOX_CODE')
     BULK COLLECT INTO
V_BASE_TYPE,
V_ORDER_NUM,
V_WIP_STATUS,
V_WIP_STATUS_DATE,
V_ORDER_DATE,
V_IP_DATE,
V_SHIP_BY_DATE,
V_CUSTOMER_SRC,
V_CUSTOMER_LOC,
V_CUSTOMER_NUM,
V_ACCOUNT_TYPE,
V_OVERPACK_FLAG,
V_INTERNATIONAL_FLAG,
V_MULTIPLE_SYSTEM_TIES,
V_ORDER_TIE_NUM,
V_TIE_STATUS,
V_PK_GEN,
V_QTY_REQD,
V_WORKCENTER_ID,
V_SI_NUMBER,
V_MFG_SCHED_FACILITY_ID,
V_MFG_FACILITY_ID,
V_PILOT_NAME,
V_ENG_HOLD_FLAG,
V_SHORT_FLAG,
V_OVR_SHORTAGE,
V_USER_HOLD_FLAG,
V_SHIP_TO_ADDRESS_SEQ_NUM,
V_CALICO_REF_NUM,
V_CONFIG_ID,
V_TOTAL_UNITS_QTY,
V_ORDER_TYPE,
V_SKU#,
V_SUB_ASSEMBLY_NUMBER,
V_BASE_ASM_FLAG,
V_QTY_REQ,
V_ORIGINAL_PART_NUMBER,
V_SUBSTITUTE_PART_NUMBER,
V_QTY_EXTENDED,
V_ISSUE_CODE,
V_ORIG_PART_DESC,
V_ORIG_COMMODITY_CODE,
V_ORIG_PRINT_ON_TRAVELER_FLAG,
V_ORIG_BOX_CODE,
V_SUBST_PART_DESC,
V_SUBST_COMMODITY_CODE,
V_SUBST_PRINT_ON_TRAVELER_FLAG,
V_SUBST_BOX_CODE
FROM TABLE(XMLSEQUENCE(EXTRACT(P_PODETAILS_XML, '/LineItems/LineItem'))) T
but getting performace problem. I'm able to insert 100 lines items in 3 sec but requirement is further less.
Any help..... ????
thanks in adavance..

hi..
me too having same type of XML data to be inserted into oracle table
i've to write procedure for this
can u help me plz.....

Similar Messages

  • XML Data Inserts into Tables???

    hi there,
    will i be able to an insertXML call onto a table wherein i need to just insert a few node values into couple of fields in the table and leave the other fields unpopulated? - aka - i need to grab the node values from the XML file and then store it to respective fields in the table with the insertXML call - something like::
    OracleXMLSave.insertXML(value-of(node1), value-of(node2)) table1.field1, table1.field2;
    is something like the above statement possible?
    Thanks..
    null

    If your XML Document looks like:
    <ROWSET>
    <ROW>
    <FIELD1>val-1</FIELD1>
    <FIELD12>val-12</FIELD12>
    </ROW>
    </ROWSET>
    it will insert into just those two
    fields, the rest will be null for
    the purposes of the insert.

  • Xml data upload into tables using loader

    Hi,
    I have to load XML file data into multiple tables using sqlloader. i wrote a cotrol file to execute this ,but i was not able to load the data into multiple tables at the same time, first loading table in control file is able to load the data ,rest of the load is giving error,please refer the below control file and log. Help me with your great efforts.
    Have a great day!
    Control file:
    LOAD DATA
    TRUNCATE
    INTO TABLE Derivative_Security
    WHEN DERIVATIVESECURITYID != ' '
    FIELDS TERMINATED BY '</DerivativeSecurity>' optionally enclosed by '"'
    TRAILING NULLCOLS
    DUMMY1 filler char(50000) Terminated by '<DerivativeSecurity ',
    DUMMY2 filler char(200) Terminated by WHITESPACE enclosed by 'FAS157Level="' and '"',
    DUMMY3 filler char(200) Terminated by WHITESPACE enclosed by 'FAS157MVAdjustable="' and '"',
    DUMMY4 filler char(200) Terminated by WHITESPACE enclosed by 'OriginalMV="' and '"',
    DUMMY5 filler char(200) Terminated by WHITESPACE enclosed by 'FAS157MVDelta="' and '"',
    DUMMY6 filler char(200) Terminated by WHITESPACE enclosed by 'FAS157AdjustedMV="' and '"',
    DUMMY7 filler char(200) Terminated by WHITESPACE enclosed by 'PLCurrency="' and '"',
    DERIVATIVESECURITYID Terminated by WHITESPACE enclosed by 'DerivativeSecurityID="' and '"',
    METDERIVATIVEID Terminated by WHITESPACE enclosed by 'MetDerivativeID="' and '"',
    MUREXTRANSNUMBER Terminated by WHITESPACE enclosed by 'MurexTransactionNumber="' and '"',
    DUMMY8 filler char(200) Terminated by WHITESPACE enclosed by 'Trader="' and '"',
    DUMMY9 filler char(200) Terminated by WHITESPACE enclosed by 'BuySell="' and '"',
    DETAILTYPE Terminated by WHITESPACE enclosed by 'DetailType="' and '"',
    DERIVATIVETYPE Terminated by WHITESPACE enclosed by 'DerivativeType="' and '"',
    AL_MANAGEMENTSIDE Terminated by WHITESPACE enclosed by 'AL_ManagementSide="' and '"',
    COUNTERPARTYCODE Terminated by WHITESPACE enclosed by 'CounterpartyCode="' and '"',
    COUNTERPARTYNAME Terminated by WHITESPACE enclosed by 'CounterpartyName="' and '"',
    CURRENCYCODE Terminated by WHITESPACE enclosed by 'CurrencyCode="' and '"',
    DUMMY10 filler char(200) Terminated by WHITESPACE enclosed by 'Coupon="' and '"',
    DUMMY11 filler char(200) Terminated by WHITESPACE enclosed by 'FixedFloatingIndicator="' and '"',
    DUMMY12 filler char(200) Terminated by WHITESPACE enclosed by 'IndexMultiplier="' and '"',
    DUMMY13 filler char(200) Terminated by WHITESPACE enclosed by 'IndexName="' and '"',
    DUMMY42 filler char(200) Terminated by WHITESPACE enclosed by 'Margin="' and '"',
    DUMMY14 filler char(200) Terminated by WHITESPACE enclosed by 'Comment11="' and '"',
    DUMMY15 filler char(200) Terminated by WHITESPACE enclosed by 'Comment12="' and '"',
    DUMMY16 filler char(200) Terminated by WHITESPACE enclosed by 'Comment13="' and '"',
    DUMMY17 filler char(200) Terminated by WHITESPACE enclosed by 'Comment21="' and '"',
    DUMMY18 filler char(200) Terminated by WHITESPACE enclosed by 'Comment22="' and '"',
    DUMMY19 filler char(200) Terminated by WHITESPACE enclosed by 'Comment23="' and '"',
    DUMMY20 filler char(2000) Terminated by WHITESPACE enclosed by 'TradeComment="' and '"',
    DUMMY21 filler char(200) Terminated by WHITESPACE enclosed by 'OptionCallPut="' and '"',
    DUMMY22 filler char(200) Terminated by WHITESPACE enclosed by 'OptionType="' and '"',
    DUMMY23 filler char(200) Terminated by WHITESPACE enclosed by 'SettleType="' and '"',
    DUMMY24 filler char(200) Terminated by WHITESPACE enclosed by 'RefISIN="' and '"',
    DUMMY25 filler char(200) Terminated by WHITESPACE enclosed by 'RefObligation="' and '"',
    DUMMY26 filler char(200) Terminated by WHITESPACE enclosed by 'Sensitivity="' and '"',
    DUMMY27 filler char(200) Terminated by WHITESPACE enclosed by 'EffectiveConvexity="' and '"',
    DUMMY28 filler char(200) Terminated by WHITESPACE enclosed by 'Vega="' and '"',
    DUMMY29 filler char(200) Terminated by WHITESPACE enclosed by 'NextResetDate="' and '"',
    DUMMY30 filler char(200) Terminated by WHITESPACE enclosed by 'LastResetDate="' and '"',
    EFFECTIVEDURATION Terminated by WHITESPACE enclosed by 'EffectiveDuration="' and '"',
    DUMMY31 filler char(200) Terminated by WHITESPACE enclosed by 'Instrument="' and '"',
    DUMMY32 filler char(200) Terminated by WHITESPACE enclosed by 'IssuerCode="' and '"',
    DUMMY33 filler char(200) Terminated by WHITESPACE enclosed by 'IssuerName="' and '"',
    DUMMY34 filler char(200) Terminated by WHITESPACE enclosed by 'IssuerREDCode="' and '"',
    DUMMY35 filler char(200) Terminated by WHITESPACE enclosed by 'Strategy="' and '"',
    DUMMY36 filler char(200) Terminated by WHITESPACE enclosed by 'StrikePrice="' and '"',
    MATURITYDATE Terminated by WHITESPACE enclosed by 'MaturityDate="' and '"',
    DUMMY37 filler char(200) Terminated by WHITESPACE enclosed by 'TickerSymbol="' and '"',
    DUMMY38 filler char(200) Terminated by WHITESPACE enclosed by 'MetPay="' and '"',
    DUMMY39 filler char(200) Terminated by WHITESPACE enclosed by 'MetRec="' and '"',
    DUMMY40 filler char(200) Terminated by WHITESPACE enclosed by 'Payrec="' and '"',
    DUMMY41 filler char(200) Terminated by WHITESPACE enclosed by 'RiskSection="' and '"',
    DUMMY54 filler char(200) Terminated by WHITESPACE enclosed by 'HedgedItem="' and '"',
    DUMMY43 filler char(200) Terminated by WHITESPACE enclosed by 'ResetFrequency="' and '"',
    DUMMY44 filler char(200) Terminated by WHITESPACE enclosed by 'ResetFrequencyNumber="' and '"',
    DUMMY45 filler char(200) Terminated by WHITESPACE enclosed by 'PaymentFrequency="' and '"',
    DUMMY46 filler char(200) Terminated by WHITESPACE enclosed by 'PaymentFrequencyNumber="' and '"',
    DUMMY47 filler char(200) Terminated by WHITESPACE enclosed by 'CapFloorCoupon="' and '"',
    DUMMY48 filler char(200) Terminated by WHITESPACE enclosed by 'RefIndexRate="' and '">',
    DUMMY50 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY51 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY52 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY53 filler char(1000) enclosed by "<Classification=" and "/>"
    INTO TABLE DERIVATIVE_POSITION
    WHEN PORTFOLIOCODE != ' '
    FIELDS TERMINATED BY '</NewDataSet>' optionally enclosed by '"'
    TRAILING NULLCOLS
    DUMMY1 filler char(65000) terminated by '<DerivativePosition ',
    DERIVATIVESECURITYID TERMINATED BY WHITESPACE enclosed by 'DerivativeSecurityID="' and '"',
    PORTFOLIOCODE TERMINATED BY WHITESPACE enclosed by 'PortfolioCode="' and '"',
    LONGSHORTINDICATOR TERMINATED BY WHITESPACE ENCLOSED BY 'LongShortIndicator="' and '"',
    FAS157Level filler char(100) TERMINATED BY WHITESPACE enclosed by 'FAS157Level="' and '"',
    FAS157MVAdjustable filler char(100) TERMINATED BY WHITESPACE enclosed by 'FAS157MVAdjustable="' and '"',
    OriginalMV filler char(100)TERMINATED BY WHITESPACE enclosed by 'OriginalMV="' and '"',
    FAS157MVDelta filler char(100) TERMINATED BY WHITESPACE enclosed by 'FAS157MVDelta="' and '"',
    FAS157AdjustedMV filler char(100)TERMINATED BY WHITESPACE enclosed by 'FAS157AdjustedMV="' and '"',
    CURRENTNOTIONALLOCAL TERMINATED BY WHITESPACE enclosed by 'CurrentNotionalLocal="' and '"',
    CURRENTNOTIONALUSD TERMINATED BY WHITESPACE enclosed by 'CurrentNotionalUSD="' and '"',
    OPENQUANTITY TERMINATED BY WHITESPACE enclosed by 'OpenQuantity="' and '"',
    ORIGINALNOTIONALLOCAL TERMINATED BY WHITESPACE enclosed by 'OriginalNotionalLocal="' and '"',
    ORIGINALNOTIONALUSD TERMINATED BY WHITESPACE enclosed by 'OriginalNotionalUSD="' and '"',
    ORIGINALQUANTITY TERMINATED BY WHITESPACE enclosed by 'OriginalQuantity="' and '"',
    ACCRUEDINTERESTLOCAL TERMINATED BY WHITESPACE enclosed by 'AccruedInterestLocal="' and '"',
    ACCRUEDINTERESTUSD TERMINATED BY WHITESPACE enclosed by 'AccruedInterestUSD="' and '"',
    ACCRUEDINTERESTBASE TERMINATED BY WHITESPACE enclosed by 'AccruedInterestBase="' and '"',
    CLEANMARKETVALUEENDOFDAYLOCAL TERMINATED BY WHITESPACE enclosed by 'CleanMarketValueEndOfDayLocal="' and '"',
    CLEANMARKETVALUEENDOFDAYUSD TERMINATED BY WHITESPACE enclosed by 'CleanMarketValueEndOfDayUSD="' and '"',
    CLEANMARKETVALUEENDOFDAYBASE TERMINATED BY WHITESPACE enclosed by 'CleanMarketValueEndOfDayBase="' and '"',
    DIRTYMARKETVALUEENDOFDAYLOCAL TERMINATED BY WHITESPACE enclosed by 'DirtyMarketValueEndOfDayLocal="' and '"',
    DIRTYMARKETVALUEENDOFDAYUSD TERMINATED BY WHITESPACE enclosed by 'DirtyMarketValueEndOfDayUSD="' and '"',
    PREMIUMLOCAL TERMINATED BY WHITESPACE enclosed by 'PremiumLocal="' and '"',
    PREMIUMUSD TERMINATED BY WHITESPACE enclosed by 'PremiumUSD="' and '"',
    PREMIUMBASE TERMINATED BY WHITESPACE enclosed by 'PremiumBase="' and '"',
    BIDDIES TERMINATED BY WHITESPACE enclosed by 'Biddies="' and '"',
    ADDONEXPOSUREUSD TERMINATED BY WHITESPACE enclosed by 'AddOnExposureUSD="' and '"',
    RegulatoryExposureUSD filler char(100) TERMINATED BY WHITESPACE enclosed by 'RegulatoryExposureUSD="' and '"',
    PARCR01 filler char(100) TERMINATED BY WHITESPACE enclosed by 'PARCR01="' and '"',
    FAS133DESIGNATIONGAAP TERMINATED BY WHITESPACE enclosed by 'FAS133DesignationGAAP="' and '"',
    FAS133DESIGNATIONSTAT TERMINATED BY WHITESPACE enclosed by 'FAS133DesignationSTAT="' and '"',
    TRADEDATE TERMINATED BY WHITESPACE enclosed by 'TradeDate="' and '"',
    EffectiveDate filler char(100) TERMINATED BY WHITESPACE enclosed by 'EffectiveDate="' and '"',
    ALLOCATION TERMINATED BY WHITESPACE enclosed by 'Allocation="' and '"' "round(:ALLOCATION,4)",
    DUMMY36 filler char(100) enclosed by '/' and '>'
    Log:
    Table DERIVATIVE_SECURITY:
    4079 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    28074 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Table DERIVATIVE_POSITION:
    0 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    32153 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 248196 bytes(26 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 32153
    Total logical records rejected: 0
    Total logical records discarded: 28074

    When there are multiple tables in a control file, SQL Loader assumes the data for the first file in the second table immediately follows the last field in the first table. You probably want SQL Loader to start looking for the first column of the second table at the start of the second table. You can do this by using the POSITION clause
    DUMMY51 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY52 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY53 filler char(1000) enclosed by "<Classification=" and "/>"
    INTO TABLE DERIVATIVE_POSITION
    WHEN PORTFOLIOCODE != ' '
    FIELDS TERMINATED BY '</NewDataSet>' optionally enclosed by '"'
    TRAILING NULLCOLS
    DUMMY1 filler *position(1)* char(65000) terminated by '<DerivativePosition ',
    DERIVATIVESECURITYID TERMINATED BY WHITESPACE enclosed by 'DerivativeSecurityID="' and '"',
    PORTFOLIOCODE TERMINATED BY WHITESPACE enclosed by 'PortfolioCode="' and '"',
    .

  • XML data insert into Oracle

    Hi all,
    I have some xml data which i would like to insert into oracle tables.
    Where to start up with this?

    Hi,
    Here's another good place to start: [XML DB FAQ|http://forums.oracle.com/forums/thread.jspa?threadID=410714&tstart=0]
    You seem to be especially interested in second post in there.
    Regards
    Peter

  • Strange data inserted into table via table trigger

    Hi ,
    There is some strange phenomenon happen occasionally where some tables update records will have a TRIGGER to insert records into a table and once in a while, the record has some strange data inserted which looks like a memory corruption. It is running on 10.2.0.3.
    Does anyone ever encounter this before?
    Strange result:
    PRIM_KEY
    -3.614364951000000000000000000000000E-47
    -3.614364951000000000000000000000000E-47
    Normal result:
    PRIM_KEY
    1137KT
    1137KT
    ana

    Hi,
    What is strange in this? Its not memory corruption. Its just one of the numeric form of representation of number
    -3.614364951000000000000000000000000E-47it means -3.614364951 * 10 to the power of -47.
    Whatever value has been entered into the table depends on your business logic you coded, and user input.
    Regards

  • XML data inserting into Master, not Page

    First, I fully admit that I jumped into the deep end of the pool.  This is my first InDesign project and I'm trying to set up a 2-page spread master to support loading my content from XML.
    Thanks to the great online help, these forums/community resources, and my growing bookshelf, I've successfully (or so it seems) created my Master layout, with frames appropriately tagged for my XML (as confirmed by the Structure).  Since I'm very novice at InDesign, my testing isn't always unambiguous, but I HAVE successfully loaded my external XML (including graphics and anchored text, plus the story) into my document.
    The problem is that the data seems to be flowing into the Master, and not the Page.  So if I create all the pages I need ahead of time (right now just 2 spreads for my test), both pages are populated with the first record.
    If I only create the first spread, then the data flows and I get the magic "+" for overflow, but I can't click on it in the Page.  If I change to the Master I can click on it, which seems the major clue as to why this isn't working.  I just have no idea how to fix it.
    From everything I've read it seems that I should be able to tag my frames in the Master (which I want to reuse for other documents) and have the data flow into the Pages.
    Am I missing something obvious? 
    Or is what I'm trying to do just not possible?  (if so, does that mean I have to keep re-tagging the frames every time I make a new Document?  ugh)
    I've spent hours trying to resolve this, and would really appreciate a pointer to get me moving again.
    Thanks!
    julie

    Hm, that seems contradictory to everything I've read and the examples I've seen  (although I may have misunderstood the examples - none are quite as complicated as my layout).  My text frame has several anchors for XML data that doesn't just flow with the story.  How do I set up the tagged anchor frames I need if the story text frame is in the Master but not tagged?
    I thought that the story text frame and the anchor frames (some graphics and some text) all needed to be in the same context.  If I put them in the Master I get the XML flowing into the Master.  If I put them into the Page then the new pages created don't have the proper frames.  If I just put the story text frame in the Master, how do I associate it with the anchor frames (I only know how to do this by using the Story editor on the tagged frame as described in A Designer's Guide To Adobe InDesign and XML)?
    I'll go back and work through the samples again, but I definitely don't understand how it all fits together.
    Thanks!
    j

  • How to extract data from xml and insert into Oracle table

    Hi,
    I have a large xml file. which will have hundreds of the following transaction tags having column names and there values.
    There is a table one of the schema with coulums "actualCostRate","billRate"....etc.
    I need to extract the values of these columns and insert into the table
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuUK" chargeCode="LCOCD1" externalID="L-RESCODE_UK1-PROJ_UK_CNT_GBP-37289-8" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-12" transactionType="L" units="11" taskID="5017601" inputTypeCode="SALES" groupId="123" voucherNumber="ABCVDD" transactionClass="ABCD"/>
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuEU" chargeCode="LCOCD1" externalID="L-RESCODE_US1-PROJ_EU_STD2-37291-4" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-04" transactionType="L" units="4" taskID="5017601" inputTypeCode="SALES" groupId="124" voucherNumber="EEE222" transactionClass="DEFG"/>

    Re: Insert from XML to relational table
    http://www.google.ae/search?hl=ar&q=extract+data+from+xml+and+insert+into+Oracle+table+&btnG=%D8%A8%D8%AD%D8%AB+Google&meta=

  • Data is not inserting into table

    Hi Team,
    I am inserting data into a custom table.
    but my records are not inserting into table
    //CO File
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("createEmployee");
    // am.invokeMethod("init");
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("Apply") != null)
    OAViewObject vo = (OAViewObject)am.findViewObject("TestEmpVO1");
    String NAME = (String)vo.getCurrentRow().getAttribute("Name");
    Number employeeNumber = (Number)vo.getCurrentRow().getAttribute("Num");
    String NUM = String.valueOf(employeeNumber.intValue());
    am.invokeMethod("apply");
    MessageToken[] tokens = { new MessageToken("EMP_NAME", NAME),
    new MessageToken("EMP_NUMBER", NUM) };
    OAException confirmMessage = new OAException("AK", "FWK_TBX_T_EMP_CREATE_CONFIRM", tokens,
    OAException.CONFIRMATION, null);
    pageContext.putDialogMessage(confirmMessage);
    else if (pageContext.getParameter("Cancel") != null)
    am.invokeMethod("rollbackEmployee");
    TransactionUnitHelper.endTransactionUnit(pageContext, "empCreateTxn");
    // End CO
    //AMImpl
    package oracle.apps.fnd.framework.toolbox.labsolutions.server;
    import oracle.jbo.Row;
    import oracle.jbo.Transaction;
    import oracle.jbo.RowSetIterator;
    import oracle.jbo.domain.Number;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.OARow;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.server.OAViewObjectImpl;
    // --- File generated by Oracle Business Components for Java.
    public class TestEmpAMImpl extends EmployeeAMImpl
    * This is the default constructor (do not remove)
    public TestEmpAMImpl()
    * Container's getter for TestEmpVO1
    public TestEmpVOImpl getTestEmpVO1()
    return (TestEmpVOImpl)findViewObject("TestEmpVO1");
    * Creates a new employee.
    public void createEmployee()
    OAViewObject vo = (OAViewObject)getTestEmpVO1();
    // Per the coding standards, this is the proper way to initialize a
    // VO that is used for both inserts and queries. See View Objects
    // in Detail in the Developer's Guide for additional information.
    if (!vo.isPreparedForExecution())
    vo.executeQuery();
    Row row = vo.createRow();
    vo.insertRow(row);
    // Required per OA Framework Model Coding Standard M69
    row.setNewRowState(Row.STATUS_INITIALIZED);
    } // end createEmployee()
    public void apply()
    getDBTransaction().commit();
    * Sample main for debugging Business Components code using the tester.
    public static void main(String[] args)
    launchTester("oracle.apps.fnd.framework.toolbox.labsolutions.server", "TestEmpAMLocal");
    //End AmImpl
    Please suggest.
    Thanks,
    Ajit

    Ajit,
    Its always a good idea to close the thread with an explanation. It will help others whenever they are into similar situation.
    --Shiv                                                                                                                                                                                                                                                                                               

  • How is the data inserted into CST_INV_QTY_TEMP table?

    Hi All,
    How is the data inserted into CST_INV_QTY_TEMP table ?
    Thanks in advance,
    Mayur
    Edited by: 928178 on 17-Apr-2012 04:29

    How is the data inserted into CST_INV_QTY_TEMP table ?TABLE: BOM.CST_INV_QTY_TEMP
    http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=CST_INV_QTY_TEMP&c_owner=BOM&c_type=TABLE
    Thanks,
    Hussein

  • Storing XML Data in a Table

    I wan to store some XML Data in a table. The sole purpose is to break the big XML in smaller chunks so that I only work with what I need to. I am a newbie at this so any help will be appreciated.
    Sample XML:
    <root>
       <row id="1">
          <node1>hello</node1>
          <node2>hola</node2>
       </row>
       <row id="2">
          <node1>hello</node1>
          <node2>hola</node2>
       </row>
    </root>Expected Result in the table:
    ID             Data
    1             <row id="1"><node1>hello</node1><node2>hola</node2></row>
    2             <row id="2"><node1>hello</node1><node2>hola</node2></row>My file is pretty big, so if I can do this with SQL Loader or another similar process it would be handy.
    Thanks.

    If anyone needs this by any chnace:
    DECLARE
       PROCEDURE load_xml (
          p_dir        IN   VARCHAR2
        , p_filename   IN   VARCHAR2
       AS
          l_bfile           BFILE                       := BFILENAME (p_dir, p_filename);
          l_clob_xml        CLOB;
          l_xml_doc         DBMS_XMLDOM.domdocument;
          l_top_node        DBMS_XMLDOM.domnode;
          l_top_node_list   DBMS_XMLDOM.domnodelist;
          l_claim_node      DBMS_XMLDOM.domnode;
          l_attr_node       DBMS_XMLDOM.domnode;
          l_attr_map        DBMS_XMLDOM.domnamednodemap;
          l_clob_data       CLOB;
          l_claim_id        VARCHAR2 (500);
          l_root_node       DBMS_XMLDOM.domnode;
          l_new_node        DBMS_XMLDOM.domnode;
       BEGIN
          -- Open a file and store the data as CLOB
          DBMS_LOB.createtemporary (l_clob_xml, TRUE);
          DBMS_LOB.fileopen (l_bfile, DBMS_LOB.file_readonly);
          DBMS_LOB.loadfromfile (l_clob_xml
                               , l_bfile
                               , DBMS_LOB.getlength (l_bfile)
          DBMS_LOB.fileclose (l_bfile);
          -- Close file
          -- Create DOMDocument handle
          l_xml_doc := DBMS_XMLDOM.newdomdocument (l_clob_xml);
          l_top_node := DBMS_XMLDOM.makenode (DBMS_XMLDOM.getdocumentelement (l_xml_doc));
          l_top_node_list := DBMS_XMLDOM.getchildnodes (l_top_node);
          FOR x IN 0 .. DBMS_XMLDOM.getlength (l_top_node_list) - 1
          LOOP
             DBMS_LOB.createtemporary (l_clob_data, TRUE);
             l_claim_node := DBMS_XMLDOM.item (l_top_node_list, x);
             l_attr_map := DBMS_XMLDOM.getattributes (l_claim_node);
             l_attr_node := DBMS_XMLDOM.getnameditem (l_attr_map, 'id');
             l_claim_id := DBMS_XMLDOM.getnodevalue (l_attr_node);
             l_root_node := DBMS_XMLDOM.clonenode (n         => l_top_node, deep => FALSE);
             l_new_node := DBMS_XMLDOM.appendchild (n             => l_root_node, newchild => l_claim_node);
             DBMS_XMLDOM.writetoclob (l_root_node, l_clob_data);
    --         DBMS_OUTPUT.put_line (l_claim_id);
    --         DBMS_OUTPUT.put_line (l_clob_data);
    --         DBMS_OUTPUT.put_line ('---------------------------');
             INSERT INTO temp_xml_test
                         (claim_id
                        , xml_doc
                  VALUES (l_claim_id
                        , l_clob_data
             DBMS_LOB.freetemporary (l_clob_data);
          END LOOP;
          COMMIT;
          DBMS_LOB.freetemporary (l_clob_xml);
       EXCEPTION
          WHEN OTHERS
          THEN
             ROLLBACK;
             DBMS_OUTPUT.put_line (SQLCODE);
             DBMS_OUTPUT.put_line (SQLERRM);
             DBMS_LOB.freetemporary (l_clob_xml);
             DBMS_LOB.freetemporary (l_clob_data);
             RAISE;
       END;
    BEGIN
       load_xml ('INPUT_DIR', 'Audit_082008.xml');
    END;

  • XML Data Load into releational structures

    Hi,
    I am very unexperienced in using XML and have the problem
    to import very large XML data files into existing reletional structures.
    In our production DB we don't use the java engine, so
    that PL/SQL an the SQL Loader are the only available ways to import the data.
    At the moment we get flat files and use the SQL Loader utility. But an interface to a new system send XML data now and I have to fill the same old releational structure with the new data.
    Can anybody give me a hint about the best technic for an high performance import. Are there any existing tools for the relational mapping?
    Regards Ralph

    Thank you for your reply.
    You are right. We only want to break the XML to fill our relational structures. We don't need the XML data further on. But we have to load the data in temporary structures, because we have to transform the data in our own format. (The system which delivers the XML data is external and uses another data model)
    Is there no more elegant way with use of databse built in technics? The XML data we get can be validated against a XML schema.
    So I thought, it could be a way to load the XML in the XDB and register the schema in the database. After that store the XML data in the default generated object relational structures and then programm the data transformation and the data flow between these default structures to our target data structures with PL/SQL.
    I don't know if this way is performant enough.
    If I use an external tool i have to code the relational mapping outside the database and insert the data with use of ODBC in temporary structures which i have to create manualy.
    So I hoped to find a way to load the data in any relational structure using the advantages of XML and XML schema and code the neccasary logic inside the DB.
    Do you have any further hints for my problem?
    Regards Ralph

  • Updating an XML data in a table column.

    Hi
    I have a data in XML form stored in a clob column in a table. Now I need to merge an XML data (update) into this XML data.
    For e.g.
    XML 1:
    ======
    <EMP>
    <ROW>
    <CODE>1</CODE>
    <NAME>
    <FIRST>abc1</FIRST>
    <LAST>xyz1</LAST>
    </NAME>
    </ROW>
    <ROW>
    <CODE>2</CODE>
    <NAME>
    <FIRST>abc2</FIRST>
    <LAST>xyz2</LAST>
    </NAME>
    </ROW>
    <ROW>
    <CODE>3</CODE>
    <NAME>
    <FIRST>abc3</FIRST>
    <LAST>xyz3</LAST>
    </NAME>
    </ROW>
    </EMP>
    XML 2:
    ======
    <EMP>
    <ROW>
    <MIDDLE>mno1</MIDDLE>
    </ROW>
    </EMP>
    Result: XML 1 + XML 2 as given below
    ========
    <EMP>
    <ROW>
    <CODE>1</CODE>
    <NAME>
    <FIRST>abc1</FIRST>
    <MIDDLE>mno1</MIDDLE>
    <LAST>xyz1</LAST>
    </NAME>
    </ROW>
    <ROW>
    <CODE>2</CODE>
    <NAME>
    <FIRST>abc2</FIRST>
    <LAST>xyz2</LAST>
    </NAME>
    </ROW>
    <ROW>
    <CODE>3</CODE>
    <NAME>
    <FIRST>abc3</FIRST>
    <LAST>xyz3</LAST>
    </NAME>
    </ROW>
    </EMP>
    As shown above I need to put the "Middle" tag from XML 2 into XML 1 and that to at a specific place in the XML 1 and not just append at the end of XML 1.
    Any solution for?
    Thanks,
    Milton.

    There are two ways to do this:
    1/ DOM API: importNode() and AdoptNode()
    2/ XSLT Transformation

  • Duplicate insert into table

    hello all,
    i am having problem when insert data into table. my first value will insert into table once again and again when i refresh page or logged in as another person.
    is it because i am using JavaScript onChange on my page? here is my script..
    <html>
    <head>
    <title>Post New Offer</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript" src="ts_picker.js"></script>
    </head>
    <body>
    <%@ page import ="java.sql.*" %>
    <%@ page import ="java.lang.*" %>
    <%@ page import ="java.util.*" %>
    <%@ page import ="java.io.*" %>
    <%@ page import ="java.text.SimpleDateFormat"%>
    <script language="JavaScript">
    function select_offer() {
    document.formoffer.submit();
    </script>
    <%!
    String username;
    String otype="";
    String submitform;
    String submitsave="";
    String bizid="";
    String contperson="";
    String ocategory="";
    String otitle="";
    String odesc="";
    String oposted="";
    String oexpiry="";
    String oprice;
    String ocheck="";
    String oqty;
    String ounit="";
    String oneeded="";
    String odelivery="";
    String opackaging="";
    String ostatus="";
    float price;
    int qty;
    int columns =0;
    int col =0;
    int vd =0;
    int columncate =0;
    int colcate =0;
    int rowcate =0;
    int vdcate=0;
    %>
    <jsp:useBean id="insertinto" class="ita.InsertNewOffer" scope="request" />
    <jsp:setProperty name="insertinto" property="*" />
    <% insertinto.connect();
    insertinto.setQueryInfo(username);
    col = insertinto.getColumn();
    Vector recordVector = insertinto.getVectorRow();
    insertinto.setQuery();
    colcate = insertinto.getColumn();
    rowcate = insertinto.getRow();
    Vector outVector = insertinto.getVectorRow();
    %>
    <!-- Header Menu -->
    <%@ include file="headermenu.jsp"%>
    <hr size="1">
    <br>
    <table width="100%" border="0">
    <tr>
    <td width="23%"><div align="right"><font size="2" face="Arial, Helvetica,
    sans-serif">Post by <b><% out.println(username); %></b></font></div>
    </td>
    </tr>
    </table>
    <!-- Left Menu -->
    <%@ include file="leftmenu.jsp"%>
    <%
    submitform = request.getParameter("submitform");
    if((submitform != null) && (submitform.equals("Post Offer")) && (!(otype.equals("none"))) && (!(bizid.equals(""))))
    ostatus = "posted";
    if((submitform != null) && (submitform.equals("Save Offer")) && (!(otype.equals("none"))) && (!(bizid.equals(""))))
    ostatus = "saved";
    bizid = request.getParameter("bizid"); if (bizid == null) { bizid = ""; }
    bizid = bizid.trim();
    otype = request.getParameter("otype"); if (otype == null) { otype = "none"; }
    ocategory = request.getParameter("ocategory"); if (ocategory == null) { ocategory = ""; }
    String cat="";
    String[] cat2 = request.getParameterValues("ocategory");
    if (cat2 != null)
    for(int i=0;i<cat2.length;i++) {
    cat += cat2[i] +";";
    //out.println("choose1 : "+cat2+"<br>");
    //out.println("choose2 : "+cat2[i]+"<br>");
    //out.println("choose3 : "+cat+"<br>");
    otitle = request.getParameter("otitle"); if (otitle == null) { otitle = ""; }
    odesc = request.getParameter("odesc"); if (odesc == null) { odesc = ""; }
    oposted = request.getParameter("oposted");
    oexpiry = request.getParameter("oexpiry");
    oexpiry = oexpiry.trim();
    oprice = request.getParameter("oprice");
    float price = 0;
    if (oprice != null) {
    try {
    price = Float.parseFloat(oprice);
    catch(NumberFormatException e) {}
    oqty = request.getParameter("oqty");
    int qty = 0;
    if (oqty != null) {
    try {
    qty = Integer.parseInt(oqty);
    catch(NumberFormatException e) {}
    ocheck = request.getParameter("ocheck"); if (ocheck == null) { ocheck = "no"; }
    ounit = request.getParameter("ounit"); if (ounit == null) { ounit = "none"; }
    oneeded = request.getParameter("oneeded"); if (oneeded == null) { oneeded = ""; }
    odelivery = request.getParameter("odelivery"); if (odelivery == null) { odelivery = ""; }
    opackaging = request.getParameter("opackaging"); if (opackaging == null) { opackaging = ""; }
    contperson = request.getParameter("contperson"); if (contperson == null) { contperson = ""; }
    contperson = contperson.trim();
    insertinto.InsertNew(bizid,otype,cat,otitle,odesc,oposted,oexpiry,price,ocheck,qty,ounit,oneeded,odelivery,opackaging,ostatus,contperson);
    insertinto.disconnect();
    %>
    <td width="77%">
    <form name="formoffer" method="post" action="NewOffer.jsp?username=<% out.println(username);%> ">
    <table width="100%" border="0" cellpadding="2">
    <tr>
    <td width="77%">
    <table width="100%" border="0">
    <tr>
    <td><font size="5" face="Arial, Helvetica, sans-serif">My Offer</font></td>
    </tr>
    <tr bgcolor="#FFCC00">
    <td colspan="3"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <b>1) Offer Detail</b></font> </td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Offer
    date :</font></td>
    <td width="61%" colspan="2"><font color="#336600" size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <%= new java.util.Date() %></font>
    <input type="hidden" name="oposted" value="<%= dateString %>"> </td>
    </tr>
    <tr>
    <td width="39%" valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Offer
    type :</font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <select name="otype" onChange="select_offer()">
         <%
         if (otype.equals("")||otype.equals("none")) { %>
    <option selected value="none">Select one</option>
    <option value="Buy">Buy</option>
         <option value="Sell">Sell</option>
         <option value="Biz Opportunity">Biz Op</option>
    <option value="Excess Stock">Excess Stock</option>
         <% }
    else if (otype.equals("Buy")) { %>
    <option value="none">Select one</option>
    <option selected value="Buy">Buy</option>
         <option value="Sell">Sell</option>
         <option value="Biz Opportunity">Biz Op</option>
    <option value="Excess Stock">Excess Stock</option>
         <% }
    else if (otype.equals("Sell")) { %>
    <option value="none">Select one</option>
    <option value="Buy">Buy</option>
         <option selected value="Sell">Sell</option>
         <option value="Biz Opportunity">Biz Op</option>
    <option value="Excess Stock">Excess Stock</option>
         <% }
    else if (otype.equals("Biz Opportunity")) { %>
    <option value="none">Select one</option>
    <option value="Buy">Buy</option>
         <option value="Sell">Sell</option>
         <option selected value="Biz Opportunity">Biz Op</option>
    <option value="Excess Stock">Excess Stock</option>
         <% }
    else if (otype.equals("Excess Stock")) { %>
    <option value="none">Select one</option>
    <option value="Buy">Buy</option>
         <option value="Sell">Sell</option>
         <option value="Biz Opportunity">Biz Op</option>
    <option selected value="Excess Stock">Excess Stock</option>
         <% } %>
    </select>
    </font> </td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Category
    : </font></td>
    <td colspan="2">
    <% vdcate=0; %>
    <select name="ocategory" size="4" multiple>
    <% while (vdcate<outVector.size()) {
    for (int j=0; j<colcate; j++) {
    if (j==0) {
    String catid = (String)outVector.elementAt(vdcate) ;
    String mainlevel = (String)outVector.elementAt(vdcate+1) ;
    String level1 = (String)outVector.elementAt(vdcate+2) ;
    String level2 = (String)outVector.elementAt(vdcate+3) ;%>
    <option value=<% out.println(catid); %> >
    <% out.println(mainlevel); %>  - 
              <% out.println(level1); %>  - 
              <% out.println(level2); %>
    <% }
    if (j > 0) {}
    vdcate++;
    } %>
    </option>
    </select>
    </td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Title
    :</font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <input name="otitle" type="text" size="35">
    </font> </td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Offer
    description :</font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <textarea name="odesc" cols="30"></textarea>
    </font> </td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Expiry date :</font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <input type="Text" name="oexpiry" readOnly style="BACKGROUND-COLOR: #eeeeee">
    <img src="img/cal.gif" width="16" height="16" border="0" alt="Click to select date">
    </font>
    </td>
    </tr>
    <%
    System.out.println("display form" +otype);
    if (otype.equals("Buy")) { %>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    Target price : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">RM
    <input name="oprice" type="text" size="7">
    <input type="checkbox" name="ocheck" value="yes">
    <font color="#FF0000">*<font color="#000000" size="1">Negotiable</font></font></font>
    </td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Minimum
    quantity :</font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <input name="oqty" type="text" size="10">
    <select name="ounit" size="1">
    <option selected value="none">Choose one</option>
    <option>Kg</option>
    <option>Pack</option>
    <option>Ton</option>
    <option>Boxes</option>
    <option>Carton</option>
    </select>
    </font></td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">When
    needed / Supply period :</font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <select name="oneeded">
    <option selected value="none">Select one</option>
    <option>Daily</option>
    <option>1 week</option>
    <option>2 weeks</option>
    <option>1 month</option>
    <option>2 months</option>
    <option>3 months</option>
    <option>6 months</option>
    </select>
    </font></td>
    </tr>
    <% } %>
    <%
    if (otype.equals("Sell")) { %>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Delivery
    : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <select name="odelivery" size="1">
    <option selected value="none">Choose one</option>
    <option>Own transport</option>
         </select>
    </font></td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Packaging
    : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <select name="opackaging" size="1">
    <option selected value="none">Choose one</option>
    <option>Included</option>
    <option>Not included</option>
         </select>
    </font></td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    Selling price : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">RM
    <input name="oprice" type="text" size="7">
    <input type="checkbox" name="ocheck" value="yes">
    <font color="#FF0000">*<font color="#000000" size="1">Negotiable</font></font></font>
    </td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Available
    quantity :</font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <input name="oqty" type="text" size="10">
    <select name="ounit" size="1">
    <option selected value="none">Choose one</option>
    <option>Kg</option>
    <option>Pack</option>
    <option>Ton</option>
    <option>Boxes</option>
    <option>Carton</option>
    </select>
    </font></td>
    </tr>
    <% } %>
    <%
    if (otype.equals("Excess Stock")) { %>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Delivery
    : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <select name="odelivery" size="1">
    <option selected value="none">Choose one</option>
    <option>Own transport</option>
         </select>
    </font></td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Packaging
    : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <select name="opackaging" size="1">
    <option selected value="none">Choose one</option>
    <option>Included</option>
    <option>Not included</option>
         </select>
    </font></td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    Offer price : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">RM
    <input name="oprice" type="text" size="7">
    <input type="checkbox" name="ocheck" value="yes">
    <font color="#FF0000">*<font color="#000000" size="1">Negotiable</font></font></font>
    </td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Available
    quantity :</font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <input name="oqty" type="text" size="10">
    <select name="ounit" size="1">
    <option selected value="none">Choose one</option>
    <option>Kg</option>
    <option>Pack</option>
    <option>Ton</option>
    <option>Boxes</option>
    <option>Carton</option>
    </select>
    </font></td>
    </tr>
    <% } %>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
    </tr>
    <% vd=0; %>
    <% for (int vd=0; vd<col; vd++) {  %>
    <tr bgcolor="#FFCC00">
    <td colspan="3" valign="top"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>2)
    Contact Information</b></font></td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Business
    ID : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <% String bizid = (String)recordVector.elementAt(vd); vd++; %>
    <% out.println(bizid); %></font>
    <input type="hidden" name="bizid" value="<% out.println(bizid); %>">
    </td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Contact person : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <% String conttitle = (String)recordVector.elementAt(vd); vd++; %>
    <% String contperson = (String)recordVector.elementAt(vd); vd++; %>
    <% out.println(conttitle);
    out.println( contperson);%>
    <input type="hidden" name="contperson" value="<% out.println(contperson); %>"></font></td></tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Company name :</font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <% out.println(recordVector.elementAt(vd));vd++; %></font>
    </td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Address
    : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
         <% out.println(recordVector.elementAt(vd));vd++; %>,
    <% out.println(recordVector.elementAt(vd));vd++; %>, 
    <% out.println(recordVector.elementAt(vd));vd++; %>
    <% out.println(recordVector.elementAt(vd));vd++; %></font></td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Telephone
    : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
         <% out.println(recordVector.elementAt(vd));vd++; %></font></td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Mobile phone
    : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
         <% out.println(recordVector.elementAt(vd));vd++; %></font></td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Fax
    :</font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <% out.println(recordVector.elementAt(vd));vd++; %></td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Email
    : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <a href ="mailto:<% out.println(username);%>@b2bxchange.com.my">
    <% out.println(username);%>@b2bxchange.com.my</a></font></td>
    </tr>
    <tr>
    <td valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Website
    : </font></td>
    <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <% String website = (String)recordVector.elementAt(vd); vd++; %>
    <a href="<% out.println(website); %>"><% out.println(website); %></a></font></td>
    </tr>
    <tr>
    <td colspan="3"><font face="Arial, Helvetica, sans-serif"> </font></td>
    </tr>
    <tr>
    <td colspan="3"><div align="center"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
    <input type="submit" name="submitform" value="Post Offer"> 
    <input type="submit" name="submitform" value="Save Offer"> 
    <input type="reset" name="resetform" value="Reset">
    </font></div></td>
    </tr>
    </table>
    </form>
    </td></tr>
    <% } %>
    <% vd=0; %>
    </table>
    </body>
    </html>

    I'm not going to try to read all your code, but I will take your hint about the "onChange".
    What I would suggest is that you set a boolean variable, such as "changed", set to false at the beginning (perhaps in the "onLoad" event). Your "onChange" event can simply change the "changed" variable to true. Then, when the user leaves the page, or clicks Submit or whatever, test that variable to see if any changes were made, then take the appropriate action.

  • How do i insert into table through forms

    Hi
    I have developed a custom form based on custom table.
    the only way to insert data into database table is through form.
    there are two tables: one table is to store all contract details & second table is to maintain history forthis.
    one condition(col1,col2,col3,col4) are unique combination,we are not creating any PK or FK at database level.evrythng is captured at form level.
    if all 4 columns combination exist thn e should not insert that record.
    if 4 columns combination doesnot exist then insert into table.
    I have used just pre insert,pre update triggers.
    I think its a basic form functionality ,by itself it inserts ,update record.now it is doing the same thng.
    But I have to add the above condition ,how can i do that.
    Pl provide me some ex code .
    Thank you.
    Hope any one can help me

    SQL> create table t
      2  (object_id    number
      3  ,object_name  varchar2(30));
    Table created.
    SQL>
    SQL> create sequence t_seq;
    Sequence created.
    SQL>
    SQL> insert into t (object_id, object_name)
      2  select t_seq.nextval
      3        ,object_name
      4  from   all_objects
      5  ;
    52637 rows created.

  • Read text file insert into table using utl_file

    Hi
    i have script for read and insert into table but i want error records load into error table so i sent you my script and please fix the error log table
    script
    DECLARE
    v_line VARCHAR2(2000);
    v_file utl_file.file_type;
    v_dir VARCHAR2(250);
    v_filename VARCHAR2(50);
    BEGIN
    v_dir :='MID5010_DOC1TP';
    v_filename := 'OPT_CM_BASE.txt';
    v_file := utl_file.fopen(v_dir, v_filename, 'r');
    LOOP
    BEGIN
    utl_file.get_line(v_file, v_line);
    EXCEPTION
    WHEN no_data_found THEN
    EXIT;
    END ;
    v_line := REPLACE(v_line,'|','|~');
    INSERT
    INTO optum_icd10cm_base VALUES
    ( REPLACE(TRANSLATE(regexp_substr(v_line,'[^|~]+',1,1),'a~','a'),'.'),
    TRANSLATE(regexp_substr(v_line,'[^|~]+',1,2),'a~','a'),
    TRANSLATE(regexp_substr(v_line,'[^|~]+',1,3),'a~','a'),
    TRANSLATE(regexp_substr(v_line,'[^|~]+',1,4),'a~','a'),
    TRANSLATE(regexp_substr(v_line,'[^|~]+',1,5),'a~','a'),
    CASE
    WHEN LENGTH(regexp_substr(v_line,'[^|~]+',1,6)) < 10
    THEN to_date(ltrim(TRANSLATE(regexp_substr(v_line,'[^|~]+',1,6),'a~','a'),'0'),'mm-yyyy')
    ELSE to_date(TRANSLATE(regexp_substr(v_line,'[^|]+',1,6),'a~','a'),'mm-dd-yyyy')
    END,
    CASE
    WHEN LENGTH(regexp_substr(v_line,'[^|~]+',1,7)) < 10
    THEN to_date(ltrim(TRANSLATE(regexp_substr(v_line,'[^|~]+',1,7),'a~','a'),'0'),'mm-yyyy')
    ELSE to_date(TRANSLATE(regexp_substr(v_line,'[^|]+',1,7),'a~','a'),'mm-dd-yyyy')
    END,
    CASE
    WHEN LENGTH(regexp_substr(v_line,'[^|~]+',1,8)) < 10
    THEN to_date(ltrim(TRANSLATE(regexp_substr(v_line,'[^|~]+',1,8),'a~','a'),'0'),'mm-yyyy')
    ELSE to_date(TRANSLATE(regexp_substr(v_line,'[^|]+',1,8),'a~','a'),'mm-dd-yyyy')
    END,
    CASE
    WHEN LENGTH(regexp_substr(v_line,'[^|~]+',1,9)) < 10
    THEN to_date(ltrim(TRANSLATE(regexp_substr(v_line,'[^|~]+',1,9),'a~','a'),'0'),'mm-yyyy')
    ELSE to_date(TRANSLATE(regexp_substr(v_line,'[^|]+',1,9),'a~','a'),'mm-dd-yyyy')
    END,
    CASE
    WHEN LENGTH(regexp_substr(v_line,'[^|~]+',1,10)) < 10
    THEN to_date(ltrim(TRANSLATE(regexp_substr(v_line,'[^|~]+',1,10),'a~','a'),'0'),'mm-yyyy')
    ELSE to_date(TRANSLATE(regexp_substr(v_line,'[^|]+',1,10),'a~','a'),'mm-dd-yyyy')
    END,
    TRANSLATE(regexp_substr(v_line,'[^|~]+',1,11),'a~','a')
    -----commit;
    END LOOP;
    utl_file.fclose(v_file);
    END;
    text file
    A50.0||Short|Long|Full|01-01-2009|01-2009||01-01-2013|09-18-2012|C|
    A50.1||Short|Long|Full|01-01-2009|01-01-2009||001-2013|09-18-2012|C|
    A50.2||Short|Long|Full|01-01-2009|01-01-2009|67|01-01-2013|09-18-2012|C|
    A50.3||Short|Long|Full|011-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A50.4||Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|5|
    A50.5|R|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A50.6||Short|Long||01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A50.7||Short||Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    2345||Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A60.0|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A60.1|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A60.2|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A60.3|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A60.4|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A60.5|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A60.6|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A60.7|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A60.8|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A60.9|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A70.0|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A70.1|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A70.2|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A70.3|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A70.4|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    B222|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A4.1|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A4.2|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A4.3|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A4.4|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A4.5|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A4.6|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A4.7|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A4.8|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A4.9|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A5.0|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A5.1|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A5.2|D|Short|Long|Full|01-01-2009|01-01-2009|01-10-2013|01-01-2013|09-18-2012|C|
    A5.3|D|Short|Long|Full|01-01-2009|01-01-2009|01-10-2013|01-01-2013|09-18-2012|C|
    D642|D|Short|Long|Full|01-01-2009|01-01-2009|01-10-2013|01-01-2013|09-18-2012|C|
    A5.5|D|Short|Long|Full|01-01-2009|01-01-2009|01-10-2013|01-01-2013|09-18-2012|C|
    A5.6|D|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A5.7|C|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A001|C|Short Updated|Long Updated|Full Updated|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A009|C|Short Updated|Long Updated|Full Updated|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A5.10|C|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A0109|C|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    F10.0|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    F10.1|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    F10.2|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    F10.3|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    F10.4|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    F10.5|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    F10.6|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    F10.7|N|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A30|C|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A316|C|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    A317|C|Short|Long|Full|01-01-2009|01-01-2009||01-01-2013|09-18-2012|C|
    ----clearly read text file insert into table and error records load into error table
    please help me

    hI
    i am using utl_file prepared script but i got error like 01861. 00000 - "literal does not match format string"
    script:
    DECLARE
    f utl_file.file_type;
    s VARCHAR2(32000);
    f1 VARCHAR2(100);
    f2 varchar2(100);
    F3 VARCHAR2(100);
    F4 VARCHAR2(100);
    F5 VARCHAR2(100);
    F6 DATE;
    F7 DATE;
    F8 DATE;
    F9 DATE;
    F10 DATE;
    f11 CHAR(1);
    BEGIN
    --DBMS_OUTPUT.ENABLE(100000);
    f := utl_file.fopen('MID5010_DOC1TP', 'OPT_CM_BASE.txt', 'R');
    LOOP
    BEGIN
    UTL_FILE.GET_LINE(f, s);
    f1 := REGEXP_SUBSTR (s,'[^|]+',1,1);
    f2 := REGEXP_SUBSTR (REPLACE(s,'||','||'),'[^|]+', 1,2);
    F3 := REGEXP_SUBSTR (REPLACE(s,'||','||'),'[^|]+', 1,3);
    F4 := REGEXP_SUBSTR (REPLACE(s,'||','||'),'[^|]+', 1,4);
    F5 := REGEXP_SUBSTR (REPLACE(s,'||','||'),'[^|]+', 1,5);
    F6 := to_date(REGEXP_SUBSTR (REPLACE(s,'||','||'),'[^|]+',1,6),'mm-dd-yyyy');
    F8 := to_date(REGEXP_SUBSTR (REPLACE(s,'||','||'),'[^|]+',1,8),'mm-dd-yyyy');
    F7 := to_date(REGEXP_SUBSTR (REPLACE(s,'||','||'),'[^|]+',1,7),'mm-dd-yyyy');
    F9 := to_date(REGEXP_SUBSTR (REPLACE(s,'||','||'),'[^|]+',1,9),'mm-dd-yyyy');
    F10 :=to_date(REGEXP_SUBSTR (REPLACE(s,'||','||') ,'[^|]+',1,10),'mm-dd-yyyy');
    f11 := REGEXP_SUBSTR (REPLACE(s,'||','||'),'[^|]+', 1,11);
    INSERT
    INTO OPTUM_ICD10CM_BASE
    ( CODE,
    STATUS,
    SHORT_DESCRIPTION,
    LONG_DESCRIPTION,
    FULL_DESCRIPTION,
    CODE_EFFECTIVE_DATE,
    CHANGE_EFFECTIVE_DATE,
    TERMINATION_DATE,
    RELEASE_DATE,
    CREATION_DATE,
    VALIDITY
    VALUES
    F1,
    F2,
    F3,
    F4,
    F5,
    F6,
    F7,
    F8,
    F9,
    F10,
    f11
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    EXIT;
    END;
    END LOOP;
    UTL_FILE.FCLOSE(F);
    END;
    please help me(in my org looks utl_file standards only)

Maybe you are looking for