"PLS-00172: string literal too long" When Writing XML file into a Table

Hi.
I'm using DBMS_XMLStore to get a XML file into a db table. See the example below, I'm using that for my PL/SQL format. Problem is that because there're too many XML elements that I use in "xmldoc CLOB:= ...", I get "PLS-00172: string literal too long" error.
Can someone suggest a workaround?
THANKS!!!
DECLARE
insCtx DBMS_XMLStore.ctxType;
rows NUMBER;
xmldoc CLOB :=
'<ROWSET>
<ROW num="1">
<EMPNO>7369</EMPNO>
<SAL>1800</SAL>
<HIREDATE>27-AUG-1996</HIREDATE>
</ROW>
<ROW>
<EMPNO>2290</EMPNO>
<SAL>2000</SAL>
<HIREDATE>31-DEC-1992</HIREDATE>
</ROW>
</ROWSET>';
BEGIN
insCtx := DBMS_XMLStore.newContext('scott.emp'); -- get saved context
DBMS_XMLStore.clearUpdateColumnList(insCtx); -- clear the update settings
-- set the columns to be updated as a list of values
DBMS_XMLStore.setUpdateColumn(insCtx,'EMPNO');
DBMS_XMLStore.setUpdateColumn(insCtx,'SAL');
DBMS_XMLStore.setUpdatecolumn(insCtx,'HIREDATE');
-- Now insert the doc.
-- This will only insert into EMPNO, SAL and HIREDATE columns
rows := DBMS_XMLStore.insertXML(insCtx, xmlDoc);
-- Close the context
DBMS_XMLStore.closeContext(insCtx);
END;
/

You ask where am getting the XML doc. Well, am not
getting the doc itself.I either don't understand or I disagree. In your sample code, you're certainly creating an XML document-- your local variable "xmldoc" is an XML document.
DBMS_XMLSTORE package needs
to know the canonical format and that's what I
hardcoded. Again, I either don't understand or I disagree... DBMS_XMLStore more or less assumes the format of the XML document itself-- there's a ROWSET tag, a ROW tag, and a then whatever column tags you'd like. You can override what tag identifies a row, but the rest is pretty much assumed. Your calls to setUpdateColumn identifies what subset of column tags in the XML document you're interested in.
Later in code I use
DBMS_XMLStore.setUpdateColumn to specify which
columns are to be inserted.Agreed.
xmldoc CLOB :=
'<ROWSET>
<ROW num="1">
<KEY_OLD> Smoker </KEY_OLD>
<KEY_NEW> 3 </KEY_NEW>
<TRANSFORM> Specified </TRANSFORM>
<KEY_OLD> Smoker </KEY_OLD>
<VALUEOLD> -1 </VALUEOLD>
EW> -1 </VALUENEW>
     <DESCRIPTION> NA </DESCRIPTION>
</ROW>
ROWSET>';This is your XML document. You almost certainly want to be reading this from the file system and/or have it passed in from another procedure. If you hard-code the XML document, you're limited to a 32k string literal, which is almost certainly causing the error you were reporting initially.
As am writing this I'm realizing that I'm doing this
wrong, because I do need to read the XML file from
the filesystem (but insert the columns
selectively)...What I need to come up with is a proc
that would grab the XML file and do inserts into a
relational table. The XML file will change in the
future and that means that all my 'canonical format'
code will be broken. How do I deal with anticipated
change? Do I need to define/create an XML schema in
10g if am just inserting into one relat. table from
one XML file?What does "The XML file will change in the future" mean? Are you saying that the structure of the XML document will change? Or that the data in the XML document would change? Your code should only need to change if the structure of the document changes, which should be exceptionally uncommon and would only be an issue if you're adding another column that you want to work with, which would necessitate code changes.
I found an article where the issue of changing XML
file is dealt by using a XSL file (that's where I'd
define the 'canonical format'), but am having a
problem with creating one, because the source XML is
screwed up in terms of the format:
it's not <x> blah </x>
<x2> blah </x2>
x2="blah" x3="blah> ...etc
Can you point me in the right direction, please?You can certainly use something like the DBMS_XSLProcessor package to transform whatever XML document you have into an XML document in an appropriate format for the XMLStore package and pass that transformed XML document into something like your sample procedure rather than defining the xmldoc local variable with a hard-coded document. Of course, you'd need to write appropriate XSL code to do the actual transform.
Justin

Similar Messages

  • CLob update failing with PLS-00172: string literal too long

    I have a clob column which needs to updated with a message on message_id
    Table description
    SQL> desc cl_message1
    Name Null? Type
    MSG_ID NOT NULL NUMBER(10)
    DATA NOT NULL CLOB
    Update statement:
    variable data1 clob;
    begin
    :data1:='TESTHDR^Add^200812310374^2012-08-19 15:53:22.0^
    TESTHDR^Add^200812310374^5652^C0000029^2012-08-19 15:46:49.0^
    TESTDWN^ADD^200812310374^5652^G^03^00000999990000722444^
    ... ----------------------------------------------------------------------------------------- 2376 lines of text-------------------------
    TESTDWN^ADD^200812310374^5674^G^10^00000999990000743289^
    TESTEND^5674^';
    UPDATE cl_message1
    SET DATA=:data1
    WHERE
    msg_id = '989';
    END;
    When I run this statement it fails with
    SQL> @test_clob_insert.sql
    :data1:='WAVEHDR^Add^200812310374^2012-08-19 15:53:22.0^
    ERROR at line 2:
    ORA-06550: line 2, column 10:
    PLS-00172: string literal too long
    As per my understanding a bind variable can store maximum value of clob. Not sure why this is throwing this error. Please help
    Regards
    This column is stored in_row.
    SQL> r
    1* select owner,table_name,column_name,in_row from dba_lobs where table_name='CL_MESSAGE1'
    OWNER TABLE_NAME COLUMN_NAME IN_
    VEERA CL_MESSAGE1 DATA YES
    Edited by: 953621 on Aug 19, 2012 10:34 PM
    Edited by: 953621 on Aug 19, 2012 11:44 PM

    953621 wrote:
    As per my understanding a bind variable can store maximum value of clob. Not sure why this is throwing this error. Please helpYes, if the bind variable is declared as a clob, then it can store the maximum size of the clob, but that's not your issue.
    Your issue is that you are setting the clob data using a string literal i.e. a single string between quotes. There is a limit to the size of string literals, so you would have to build up the clob by appending many string literals together instead.

  • String literal too long error while invoking a package with clob variable

    I have a package.One of the input variables of the procedure in packae is clob.
    I want to invoke this package with a huge clob as input.
    when i invoke this package like that i am getting following error
    PLS-00172 string literal too long
    can't we pass clob(huge clob) as input .is there any solution for that ?
    Thanks
    Pramod Garre

    842802 wrote:
    If insert this data into a table , from sql prompt still i get the same error.Do you mean SQL*Plus? Then there is buffer limitation and it is better to split literal into, let say 1000 character chunks:
    SQL*Plus: Release 10.2.0.4.0 - Production on Tue Mar 29 16:17:26 2011
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    SQL> SY.

  • Access Migration Error Creating Migration Project - string literal too long

    I get this error when attempting to create an MS Access Migration Project:
    ORA-20001: GET_BLOCK Error. ORA-20001: GET_STMT error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line 8, column 8: PLS-00172: string literal too long &amp;lt;pre&amp;gt;begin &amp;amp;lt;br&amp;amp;gt;declare &amp;amp;lt;br&amp;amp;gt; p varchar(32767) := null; &amp;amp;lt;br&amp;amp;gt; l_clob clob; &amp;amp;lt;br&amp;amp;gt;begin &amp;amp;lt;br&amp;amp;gt; dbms_lob.createtemporary(l_clob,FALSE, dbms_lob.session); &amp;amp;lt;br&amp;amp;gt; dbms_lob.open(l_clob,dbms_lob.lob_
    I suspected the 'string literal too long' was due to a very long code section in the Exporter .sql file -
    So I edited out that code except - essentially by cutting the macro code within the quotes, cutting down that code module.
    Same error.
    Any suggestions on what else may be causing this?
    Thanks - Karen

    I found it - two other big long ugly macros that I had to cut out as well. Then the migration project created just fine. Thanks for the moral support :)

  • Error message :ORA-01704: string literal too long

    Hello:
    I need your help. I have a long long string must be insert to
    database. I use long data type and long varchar data type to
    define table. But I got the error messages is ORA-01704: string
    literal too long when I insert data. Please tell me the solution.
    Thank you so so much.

    Hello,
    I have a table with a column "XML_Data" of type CLOB.
    I am trying to insert XML of the size 59975. I
    get a error message ORA-01704: string literal too
    long.
    How to enter that large XML??
    Regards,
    Sanjeev.Try using Oracles XMLDB, by dropping the XML file into the XMLDB WebDAV area and then you can access it directly through the database "resource_view". No limits on file size whatsoever.
    If you're using XML within an Oracle database you're better off doing things this way as it gets stored in an XMLType column (sys.xmltype) which is a superset object of the CLOB datatype, providing all the object methods you need to navigate, update and query your XML. You won't be able to do much with it just sitting in a CLOB column without re-writing the wheel that Oracle have already built.
    ;)

  • ORA-01704: string literal too long (URGENT)

    Folks,
    I get error - ORA-01704: string literal too long,
    when trying to insert a value >4k into the SDIDOC column of the table below:
    CREATE TABLE "B1"."SDI_XML_TAB"
    ( "SDIID" VARCHAR2(60 BYTE) NOT NULL ENABLE,
    "SDIDOC" "SYS"."XMLTYPE" ,
    CONSTRAINT "SDI_XML_TAB_PK" PRIMARY KEY ("SDIID")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "B1SYSTEM" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "B1SYSTEM"
    XMLTYPE COLUMN "SDIDOC" STORE AS CLOB (
    TABLESPACE "B1SYSTEM" ENABLE STORAGE IN ROW CHUNK 16384 PCTVERSION 10
    NOCACHE LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) ;
    The SQL I used using OCI was:
    "INSERT INTO SDI_XML_TAB(SDIID,SDIDOC) VALUES('ABC','clobVal')"
    What am I doing wrong?
    P.S. I also used the following and it gives the same error:
    "INSERT INTO SDI_XML_TAB(SDIID,SDIDOC) VALUES('ABC',XMLType('clobVal'))"
    Thanks,
    Arthur
    Message was edited by:
    ArthurJohnson

    Check this cool-bi.com

  • How to handle the SQL Error: ORA-01704: string literal too long

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta name="generator" content="HTML Tidy for Java (vers. 26 Sep 2004), see www.w3.org">
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta content="MSHTML 6.00.2900.2963" name="GENERATOR">
    </head>
    <body class="BodyContent">
    HI please chek the query getting error like string literal too long update PRVDR_ENRLMNT_AGREEMENT B set b.terms=q'#
    <div class="widget-title">
    <h5>Medical Assistance Provider Enrollment & Trading Partner Agreement - Conditions:</h5>
    <a href="# class="btn-minimize pull-right"></a></div>
    <div class="widget-content">
    <table width="100%" border="0">
    <tbody>
    <tr valign="center">
    <td class="Label" align="left" width="14%" colspan="2" height="32">In applying for enrollment as a provider or trading partner in the Medical Assistance Program (and programs for which the Michigan Department of Community Health (MDCH) is the fiscal intermediary), I represent and certify as follows:</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>1.</b></td>
    <td class="LabelValue" valign="top" align="left" height="32">The applicant, and the employer (if applicable), certify that the undersigned has/have the authority to execute this Agreement.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>2.</b></td>
    <td class="LabelValue" valign="top" align="left" height="32">Enrollment in the Medical Assistance Program does not guarantee participation in MDCH managed care programs nor does it replace or negate the contract process between a managed care entity and its providers or subcontractors.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>3.</b></td>
    <td class="LabelValue" valign="top" align="left" height="32">All information furnished on this Medical Assistance Provider Enrollment & Trading Partner Agreement form is true and complete.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>4.</b></td>
    <td class="LabelValue" valign="top" align="left" height="32">The providers and fiscal agents of ownership and control information agree to provide proper disclosure of provider's owners and other persons criminal related to Medicare, Medicaid or Title XX involvement. [42 CFR 455.100]</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>5.</b></td>
    <td class="LabelValue" align="left" height="32">The applicant and the employer agree to provide proper disclosure of any criminal convictions related to Medicare (Title XVIII), Medicaid (Title XIX), and other State Health Care Programs (Title V, Title XX, and Title XXI) involvement. [42 CFR 455.106 and 42 U.S.C. ? 1320a-7]</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>6.</b></td>
    <td class="LabelValue" align="left" height="32">I agree to read the Medicaid Provider Manual from the Michigan Department of Community Health (MDCH). I also agree to comply with 1) the terms and conditions of participation noted in the manual, and 2) MDCH's policies and procedures for the Medical Assistance Program contained in the manual, provider bulletins and other program notifications.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>7.</b></td>
    <td class="LabelValue" align="left" height="32">I agree to comply with the provisions of 42 CFR 455.104, 42 CFR 455.105, 42 CFR 431.107 and Act No. 280 of the Public Acts of 1939, as amended, which state the conditions and requirements under which participation in the Medical Assistance Program is allowed.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>8.</b></td>
    <td class="LabelValue" align="left" height="32">I agree to comply with the requirements of Section 6032 of the Deficit Reduction Act of 2005, codified at section 1902 (a)(68) of the Social Security Act which relates to the conditions and requirements of "Employee Education About False Claims Recovery."</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>9.</b></td>
    <td class="LabelValue" align="left" height="32">I agree that, upon request and at a reasonable time and place, I will allow authorized state or federal government agents to inspect, copy, and/or take any records I maintain pertaining to the delivery of goods and services to, or on behalf of, a Medical Assistance Program beneficiary. These records also include any service contract(s) I have with any billing agent/service or service bureau, billing consultant, or other healthcare provider.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>10.</b></td>
    <td class="LabelValue" align="left" height="32">I agree to include a clause in any contract I enter into which allows authorized state or federal government agents access to the subcontractor's accounting records and other documents needed to verify the nature and extent of costs and services furnished under the contract.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>11.</b></td>
    <td class="LabelValue" align="left" height="32">I understand that the incentive payment requested using my National Provider Identifier (NPI) number will be made directly to the Tax ID Number (TIN) that was indicated during the registration process.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>12.</b></td>
    <td class="LabelValue" align="left" height="32">I am not currently suspended, terminated, or excluded from the Medical Assistance Program by any state or by the U.S. Department of Health and Human Services.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>13.</b></td>
    <td class="LabelValue" align="left" height="32">I agree to comply with all policies and procedures of the Medical Assistance Program. I also agree that all disputes, including overpayments, may be adjudicated in administrative proceedings convened under Act No. 280 of the Public Acts of 1939, as amended, or in a court of competent jurisdiction. I further agree to reimburse the Medical Assistance Program for all overpayments, and I acknowledge that the Medicaid Audit System, which uses random sampling, is a reliable and acceptable method for determining such overpayments.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>14.</b></td>
    <td class="LabelValue" align="left" height="32">I agree to comply with the privacy and confidentiality provisions of any applicable laws governing the use and disclosure of protected health information, including the privacy regulations adopted by the U.S. Department of Health and Human Services under the Health Insurance Portability and Accountability Act of 1996 (HIPAA), and Public Acts 104-191 (45 CFR Parts 160 and 164, Subparts A and E). I also agree to comply with the HIPAA security regulations, as applicable, for electronic protected health information by the compliance date, which is currently April 21, 2005 (45 CFR Parts 160 and 164, Subparts A and C).</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>15.</b></td>
    <td class="LabelValue" align="left" height="32">This Agreement shall be governed by the laws of the State of Michigan and applicable federal law including, but not limited to, the Health Insurance Portability and Accountability Act of 1996 (HIPAA).</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>16.</b></td>
    <td class="LabelValue" align="left" height="32">The provisions of this Agreement are severable. If any provision is held or declared to be illegal, invalid or unenforceable, the remainder of the Agreement will continue in full force and effect as though the illegal, invalid or unenforceable provision had not been contained in this Agreement.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>17.</b></td>
    <td class="LabelValue" align="left" height="32">Failure or delay on the part of either party to exercise any right, power, privilege, or remedy in this Agreement will not constitute a waiver. No provision of this Agreement may be waived by either party except in writing and signed by an authorized representative of the party requesting the waiver.</td>
    </tr>
    <tr valign="center">
    <td class="Label" align="left" width="14%" colspan="2" height="32"></td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>18.</b></td>
    <td class="LabelValue" align="left" height="32">If the nursing facility named on the Medical Assistance Provider Enrollment & Trading Partner Agreement is sold, the seller will notify MDCH of the sale at least ninety (90) days prior to the expected sale date. Further, it is understood that the sale will not be recognized for reimbursement purposes under the Medical Assistance Program until ninety (90) days after such notification. Provisions of 42 CFR 413.135(f) will be retrospectively satisfied at that time. Any exception must be approved in writing by MDCH. The new owner/provider must receive Medicare certification for all Medicaid-only beds in the facility within one year from the date of purchase of an operating nursing facility or from the date of reopening a previously closed nursing facility.</td>
    </tr>
    <tr valign="center">
    <td class="Label" align="middle" width="14%" colspan="2" height="32">Medical Assistance Provider - Employer/Employee Conditions</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>19.</b></td>
    <td class="LabelValue" align="left" height="32">The applicant is employed by the business listed, now referred to as the "employer", to provide Medical Assistance Program services to eligible beneficiaries at the service address listed.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>20.</b></td>
    <td class="LabelValue" valign="top" align="left" height="32">The employer and the applicant shall advise MDCH within thirty (30) days after any change(s) in the employment relationship.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>21.</b></td>
    <td class="LabelValue" align="left" height="32">The employer and the applicant agree to be jointly and severally liable for any overpayments billed and paid under Act No. 280 of the Public Acts of 1939, as amended, for services provided by the applicant to eligible beneficiaries.</td>
    </tr>
    <tr valign="center">
    <td class="Label" align="middle" width="14%" colspan="2" height="32">Trading Partner Provisions</td>
    </tr>
    <tr valign="center">
    <td class="Label" align="left" width="14%" colspan="2" height="32">The MDCH and its Trading Partner desire to facilitate the exchange of healthcare transactions ("Transactions") by electronically transmitting and receiving data in agreed formats in substitution for conventional paper-based documents.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>1.</b></td>
    <td class="LabelValue" align="left" height="32">Companion Documents; Standards; Other Documentation. MDCH makes available certain inbound and outbound Electronic Data Interchange (EDI) transaction sets/formats and associated version. From time to time during the term of this Agreement, MDCH may modify supported transaction sets/formats. In submitting Transactions to MDCH, the Trading Partner agrees to conform to MDCH-issued provider publications and MDCH Companion Guides as amended from time to time. The MDCH Companion Guides, incorporated by reference herein, contain specific instructions for conducting each Transaction and as such supplement Implementation Guides issued under the Standards for Electronic Transactions mandated by the Health Insurance Portability and Accountability Act of 1996 (HIPAA) as amended. The MDCH Companion Guides are not intended to be complete billing instructions and do not alter or replace applicable physician guides or other healthcare provider billing publications issued by MDCH or by other third party payers. The Trading Partner agrees to comply with the requirements set forth in the applicable MDCH Companion Guides. The Trading Partner, or its vendor, or other authorized technical representative responsible for EDI software will document Trading Partner Information, data formats and related versions, trading partner identifiers, and other information MDCH requires to receive and transmit specific Transactions supported by MDCH.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>2.</b></td>
    <td class="LabelValue" align="left" height="32">Support.<br>
    As to software, equipment, and services associated with each party's performance under this Agreement, the parties agree to provide support services sufficient for Transactions to be exchanged. Each party will assist the other in establishing and/or maintaining support procedures, and will complete appropriate problem determination procedures prior to contacting the other with a support related matter. The parties agree to use all commercially reasonable efforts to avoid and resolve performance and unavailability issues. Each party will perform remedial action, as requested by the other, to assist in problem resolution. Each party, at its own expense, shall provide and maintain the equipment, software, services, and testing necessary to effectively and reliably transmit and receive transactions.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>3.</b></td>
    <td class="LabelValue" align="left" height="32">Data Retention.<br>
    MDCH will log all Transactions for the purpose of problem investigation, resolution, and servicing. The Trading Partner is responsible for maintaining and retaining its own records of data submitted to MDCH. Trading Partners who are healthcare providers will ensure that electronic healthcare claims submitted to MDCH can be readily associated and identified with the correct patient medical and business office records, and that these records are maintained in a manner that permits review, and for the time period as may be required by MDCH or other third party payer responsible for claim payment.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>4.</b></td>
    <td class="LabelValue" align="left" height="32">Proper Receipt and Verification for Transactions.<br>
    Upon proper receipt of any ANSI ASC X12N Standard Transaction, the receiving party shall promptly and properly transmit a functional acknowledgement in return, unless otherwise specified. The functional and interchange acknowledgements must be accepted and reviewed, when applicable, to confirm the receipt of a Transaction. The ability to send or receive functional acknowledgements is applicable only to ANSI ASC X12N Standard Transactions. Additionally, MDCH originated outbound Transactions must be accepted and reviewed, when appropriate, to obtain MDCH's response to specific inbound Transactions. The acknowledging party does not attest to the accuracy of the data contained in the transmission; rather, it only confirms receipt of the transmission.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>5.</b></td>
    <td class="LabelValue" align="left" height="32">Liability.<br>
    MDCH shall not be responsible to the Trading Partner nor anyone else for any damages caused by loss, delay, rejection, or any misadventure affecting such electronic information. In addition, MDCH shall be excused from performing any EDI servi

    You cannot use string literal of more than 4000 characters in an Oracle SQL statement. I'm not going to count that string you so rudely posted but I presume it is longer than that figure. You'll need to use a variable instead.
    declare
        c clob := '<your vast XML doc here>';
    begin
        update PRVDR_ENRLMNT_AGREEMENT B set b.terms= c
        where ....
    {code}
    Cheers, APC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • [ORA-01704: string literal too long] in a long xquery

    I get an error when using queries with xmlquery.
    If the quoted string part is longest than 4000 chr then I get
    ORA-01704: string literal too long.
    Example...
    select xmlquery(
    ' <Root >
         {for $xxx in ora:view("ttttttt")
            let $nnn := $xxx/ROW/nnn/number()
    [total chr>4000] '
    RETURNING CONTENT)
    from dual
    Is it really not possible to write Oracle xmlqueries longest than 4000chr or there's a workaround for it?

    I got similary problem using the OCCI to insert record in my table.
    I have a BLOB field in my table and whenever I quote an HEX string that is bigger than 4000 chars I get the error: ORA-01704: string literal too long
    To sort that problem I have to pass to the prepared SQL statement, but now I got a new problem for which I do not have solution.
    I write here the piece of C++ code to insert and the error I get hoping somebody can help me.
    I have problem to write into a Blob object.
    I get the error: ORA-22275: Invalid LOB Locator Specified.
    The error occurs when I try to write into the blob variable:
    blobField.writeChunk(....
    Routine:
    void insert2 (void) throw (SQLException)
    cout << "=== Prepare Statement ===" << endl;
    Statement* stmtIns = occiConn->createStatement("insert into test_tab values (:1,:2,:3,:4,:5)");
    cout << "=== Prepare the Blob data ===" << endl;
    // Prepare all Blobs in an array of char.
    char* data[5];
    ub2 dataLen[5];
    int i;
    for (i = 0; i < 5; i++)
    data[i] = new char[16364];
    memset(data, 65+i, 16364);
    dataLen[i] = 16364;
    cout << "=== Assign the other fields ===" << endl;
    stmtIns->setInt(1, i + 10);
    stmtIns->setInt(2, i + 1000);
    stmtIns->setInt(3, i + 10000);
    stmtIns->setInt(4, i + 20);
    // Assign the blob field
    Blob blobField(occiConn);
    blobField.setEmpty();
    cout << "=== Opening the blob field in read/write mode ===" << endl;
    blobField.open(OCCI_LOB_READWRITE);
    cout << "=== Writing data into the blob ===" << endl;
    blobField.writeChunk(dataLen[0], reinterpret_cast<unsigned char*>(data[0]), dataLen[0], 1);
    blobField.close();
    cout << "=== Done ===" << endl;
    stmtIns->setBlob(5, blobField);
    cout << "=== Execute the iteration ===" << endl;
    stmtIns->executeUpdate();
    for (i = 0; i < 5; i++)
    delete [] data[i];
    stmtIns->executeUpdate("COMMIT");
    occiConn->terminateStatement(stmtIns);

  • Literal too long when 4000 chars

    I get an error that literal too long when trying to insert a record to a clob or varchar2 field when the string is over 4000 chars.
    How to resolve this problem. I'd like to be able to treat this insert the same as all other inserts rather than make a special case out of it so no special processing would be needed.
    The application reads from an html form textarea and inserts the value of the text area along with the other fields of the form to a database.

    Hi,
    The maximum length of VARCHAR2 data is 4000 bytes.
    You can't store more than 4000 bytes in varchar2 column.
    CLOB can store upto 4GB of data.
    You can check the LOB Datatype sample for details on how to insert data into CLOB.
    The sample is located at
    [url http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/LOBSample/LOBSample.java.html] LOB Datatype source
    Check the loadSamples method which shows how to insert data into CLOB using empty_clob() method.
    Hope this helps.
    For furthur clarifications please post your question at
    [url http://forums.oracle.com/forums/forum.jsp?forum=75]SQL and PL/SQL Forum
    Regards,
    Anupama
    [url http://otn.oracle.com/sample_code/content.html]OTN Sample Code[url ]

  • Using clobs and ORA-01704: string literal too long

    Hi,
    I am attempting to add oracle support to an existing J2ee application. The issue I am facing is the use of CLOB datatypes and the 4k string literal limitation that Oracle has.
    I have dowloaded the 10.2.0.3 thin driver and am connected to a 9i release 2 database. When I execute a statement such as the following (say the table has one varchar2 field and two clob fields
    Insert into my_table VALUES ('hi','something','pretend this string is 5000 characters')
    I still receive the error
    java.sql.SQLException: ORA-01704: string literal too long
    I have read that the version 10 drivers were supposed to address this limitation. Is there something I am missing or must I change my home grown database layer to use bind variables or clob manipulation in a separate update/insert statement.? I am trying to avoid this situation since the database layer works fine for the situation of MSSQL and text fields which have no such limitation.
    Any advice you have here is greatly appreciated.
    Thanks,
    Joe

    Hi,
    I am attempting to add oracle support to an existing J2ee application. The issue I am facing is the use of CLOB datatypes and the 4k string literal limitation that Oracle has.
    I have dowloaded the 10.2.0.3 thin driver and am connected to a 9i release 2 database. When I execute a statement such as the following (say the table has one varchar2 field and two clob fields
    Insert into my_table VALUES ('hi','something','pretend this string is 5000 characters')
    I still receive the error
    java.sql.SQLException: ORA-01704: string literal too long
    I have read that the version 10 drivers were supposed to address this limitation. Is there something I am missing or must I change my home grown database layer to use bind variables or clob manipulation in a separate update/insert statement.? I am trying to avoid this situation since the database layer works fine for the situation of MSSQL and text fields which have no such limitation.
    Any advice you have here is greatly appreciated.
    Thanks,
    Joe

  • Clobs and "String Literal too long"

    Hi,
    I think I put this in the wrong place originally.
    I am attempting to add oracle support to an existing J2ee application. The issue I am facing is the use of CLOB datatypes and the 4k string literal limitation that Oracle has.
    I have dowloaded the 10.2.0.3 thin driver and am connected to a 9i release 2 database. When I execute a statement such as the following (say the table has one varchar2 field and two clob fields
    Insert into my_table VALUES ('hi','something','pretend this string is 5000 characters')
    I still receive the error
    java.sql.SQLException: ORA-01704: string literal too long
    I have read that the version 10 drivers were supposed to address this limitation. Is there something I am missing or must I change my home grown database layer to use bind variables or clob manipulation in a separate update/insert statement.? I am trying to avoid this situation since the database layer works fine for the situation of MSSQL and text fields which have no such limitation.
    Any advice you have here is greatly appreciated.
    Thanks,
    Joe

    Thanks for the reply.
    So are you indicating that the issue would not exist for a 10g database?

  • "ORA-01704: string literal too long" in Oracle 10g

    I would like to explain my problem with an example, let's create the following table:
    CREATE TABLE longtest
    (text LONG);
    I have to insert lots of data into this table and when I run this command:
    INSERT INTO LONGTEST VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    ..................more than 4000 characters..................
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
    I get the following error:
    ORA-01704: string literal too long
    To workaround this, I used bind variables, like this:
    BEGIN
    EXECUTE IMMEDIATE 'INSERT INTO LONGTEST VALUES (:a) '
    using
    'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    ..............(repeat more than 32768 characters)..............
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
    COMMIT;
    END;
    This worked fine with Oracle 9.2.0.4 but when I do the same thing
    in Oracle 10.2.0.2 there is a 32768 characters limit.
    I am planning to upgrade the database but I need a workaround for
    this, anyone knows why Oracle behaves differently in 10g??

    So, I wonder if anyone can explain why the following code works fine in Oracle 9.2.0.4 but not in Oracle 10.2.0.2:
    CREATE TABLE longtest
    (text LONG);
    BEGIN
    EXECUTE IMMEDIATE 'INSERT INTO LONGTEST VALUES (:a) '
    using
    'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    ..............(repeat more than 32768 characters)..............
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
    COMMIT;
    END;
    Regards,
    Cassiano

  • Limitation for CLOB columns? - ORA-01704: string literal too long

    Hello!
    I'm trying to update a CLOB column with more than 35000 characteres, but I get "ORA-01704: string literal too long".
    The code:
    declare
    l_clob clob;
    begin
    update test set test = empty_clob()
    WHERE ID = 1
    returning test into l_clob;
    dbms_lob.write( l_clob, length('A...here 35000xA...A'), 1,'A...here 35000xA...A');
    end;
    Is there any limitation for CLOB columns?
    Thanks for help.
    Daniel

    user605489 wrote:
    32768 characteres :)Actually it's 1 character less than 32K...
    *32767*
    SQL> declare
      2    v_vc varchar2(32768);
      3  begin
      4    null;
      5  end;
      6  /
      v_vc varchar2(32768);
    ERROR at line 2:
    ORA-06550: line 2, column 17:
    PLS-00215: String length constraints must be in range (1 .. 32767)
    SQL>I guess it comes from a legacy thing where signed words (2 bytes) are/were used to represent a value. As the most significant bit of the word is used to represent the sign of the number the range goes from -32768 to 32767.

  • String Literal too long / CLOB Issue

    I have a table with a "Clob" column called Message. This is where I store the message of an email. We have an internal email app. What is happening is I can't insert anything bigger then around 3990 or something around there. In my procedure I have the parameter coming in as clob and I use a TO_CHAR() around the table column and my parameter or my procedure gives me this error
    PL/SQL: ORA-00932: inconsistent datatypes: expected - got CLOB
    But when it runs and I put in a 9000 character message it says
    Oracle.DataAccess.Client.OracleException was unhandled by user code
    Message="ORA-01704: string literal too long
    I'm using C# with
    Oracle.DataAccess.Client.OracleConnection to create my oracle connection and Oracle 10g.
    I'm calling this procedure from my app. By doing this am I causing it to only hold 4000 characters?
    Here is a scaled down version of my code on just that column
    CREATE OR REPLACE PROCEDURE EMAILINS (
    P_MSG IN CLOB
    AS
    varT VARCHAR2(10000);
    varSQL VARCHAR2(20000);
    varTemp NUMBER;
    BEGIN
    -- SEE IF STRING EXISTS
    SELECT 1 INTO varTemp
    FROM tblEmail
    WHERE TO_CHAR(MESSAGE) = P_MSG
    EXCEPTION
    WHEN TOO_MANY_ROWS THEN
    varSQL := varT||CHR(10)||'***Multiple Rows Exist in Table tblEmail***';
    DBMS_OUTPUT.PUT_LINE(varSQL);
    WHEN NO_DATA_FOUND THEN
    varT := P_MSG;
    varSQL := 'INSERT INTO TBL_EMAIL( MESSAGE)'||CHR(10);
    varSQL := varSQL || 'VALUES (tblEmail_SEQ.NEXTVAL,'||varT||')';
    EXECUTE IMMEDIATE varSQL;
    END EMAILINS;

    In the first place, you don't need (and surely don't want) dynamic SQL to do the insert. Replace
    varT := P_MSG;
    varSQL := 'INSERT INTO TBL_EMAIL( MESSAGE)'||CHR(10);
    varSQL := varSQL || 'VALUES (tblEmail_SEQ.NEXTVAL,'||varT||')';
    EXECUTE IMMEDIATE varSQL;with the simpler
    INSERT INTO tbl_email( <<primary key column>>, message )
      VALUES( tblEmail_Seq.nextval, p_msg );Secondly, you want to use the DBMS_LOB.COMPARE function to determine whether the contents of the LOBs match. So replace
    SELECT 1
      INTO varTemp
      FROM tblEmail
    WHERE TO_CHAR(MESSAGE) = P_MSG with
    SELECT 1
      INTO varTemp
      FROM tblEmail
    WHERE dbms_lob.compare( message, p_msg ) = 0Of course, it is going to be relatively expensive to run this query every time you insert a new message unless the table is always going to be very small, which seems unlikely. It also doesn't prevent duplicate entries if there are multiple threads executing at the same time.
    Justin

  • String Literal Too Long - error?

    I'm using a CLOB datatype but via an ODBC connection I'm given an error when I insert a value larger than 4000 chars:
    ODBC Error Code = S1000 (General error)
    [Oracle][ODBC][Ora]ORA-01704: string literal too long.
    SQL:
    insert into TEST2
    (ARTICLE,UUID)
    values ('Very long string I wont repeat here!','1234')
    DESCRIBE confirms that the datatype is CLOB and not VARCHAR2. Am I doing something wrong or is it a restriction in the ODBC driver? The version installed is 8.1.5.6. I can't install the very latest version because it comaplains that it needs a newer version of the Oracle Installer. Thanks.

    Hi Justin,
    Thanks for pointing me back to the other topic where I asked the question. I lost it under all of the new topics that had been posted! Andrew's reply is very helpful but assumes I have the data stored in a file, which I don't. I've replied hoping Andrew still has the patience to help! :-)

Maybe you are looking for

  • How to connect my old imac G4 (no airport card) to lynksys router

    I am going to buy a new imac. I want to put my old G4 15" with no airport card installed into my daughter's room. I have a linksys wireless router WRT54G connected to my dsl modem. The linksys wireless router is linked to my imac via an ethernet cabl

  • Sql case statement with link not opening new window

    Apex 4.2 I am writing a query that has a case statement. I need the case statement to open up a new window, not a new tab. I have the following: SELECT case when SCHED_ID = 1 then '<a href="javascript:popupURL(''http://www.google.com'')">LINK</a>' en

  • How to reinstall my coputer

    Hey i need to know how to reinstall my Computer

  • Save and load variables in java

    Hi , I need a help about Save and load . I have a project(tool) which have JText, JRadioButton and other things also. I want to save all the changes for the next execution ( fresh startup or fresh bring up of the tool). Please let me know what will b

  • Voice mail and online number

    I have set up voice mail for my account; then bought an online number. When I called my online number from my iPhone, it did not answer with voice mail. Do I have to set up a NEW voice mail for my new online number?