Sys.XMLType.createxml unable to insert through sqlplus

I am trying to insert xmltype (sys.XMLType.createxml()) data through sqlplus in oracle.
i am getting error as literal string too long.
setting long as 1000000
i am able to read and display the contents.
But still NOT able to INSERT. The data is around 47784 charaters.
any clues or any useful links.
the query that i am using
insert into sometable values("",sys.XMLType.createxml('string of around 48000 chars'));
error that i recieve
ORA-01704: string literal too long

Actually the limit is approx 32K bytes for a SQL*PLUS literal...
If your XML is schema based 9iR2 allows you to upload the XML direct to the database and store in tables you define using FTP or WebDAV.
If the content is not schema based and you can ftp the file to the local file system of the machine running the server you can do something like this using the bfile mechanism.
Note this is a 9iR2 example, that takes care of converting the character set of the file into the character set of the database...
set echo on
create or replace function getContent(file bfile,
                          charset varchar2 default 'WE8MSWIN1252'
return CLOB deterministic
is
  charContent     CLOB;
  targetFile      bfile;
  dest_offset     number :=  1;
  src_offset      number := 1;
  lang_context    number := 0;
  conv_warning    number := 0;
  begin
    targetFile := file;
    DBMS_LOB.createTemporary(charContent,true,DBMS_LOB.SESSION);
    DBMS_LOB.fileopen(targetFile, DBMS_LOB.file_readonly);
    DBMS_LOB.loadClobfromFile
       charContent,
       targetFile,
       DBMS_LOB.getLength(targetFile),
       dest_offset,
       src_offset,
       nls_charset_id(charset),
       lang_context,
       conv_warning
    DBMS_LOB.fileclose(targetFile);
    return charContent;
end;
show errors
create or replace function getFileContent(file bfile,
                           charset varchar2 default 'WE8MSWIN1252'
return CLOB deterministic
is
begin
    return getContent(file,charset);
end;
show errors
create or replace function getDocument(filename varchar2,
                           charset varchar2 default 'WE8MSWIN1252'
return CLOB deterministic
is
   file            bfile := bfilename('DIR',filename);
begin
  return getFileContent(file,charset);
end;
show errors
create or replace function getXML(filename varchar2,
                      charset varchar2 default 'WE8MSWIN1252'
return XMLTYPE deterministic
is
  DOC clob;
  XML xmltype;
begin
  DOC := getDocument(filename,charset);
  XML := xmltype(DOC);
  dbms_lob.freeTemporary(DOC);
  return XML;
end;
show errors
drop directory DIR
create directory DIR as '/tmp/xmlDir'
commit
insert into some table values ("",getXML('Filename.xml'));The above example assumes that the file in the directory '/tmp/xmlDir';

Similar Messages

  • Sys.XMLType.createxml  unable to insert in 9i through sqlplus

    I am trying to insert xmltype (sys.XMLType.createxml()) data through sqlplus in oracle.
    i am getting error as literal string too long.
    setting long as 1000000
    i am able to read and display the contents.
    But still NOT able to INSERT. The data is around 47784 charaters.
    any clues or any useful links.
    the query that i am using
    insert into sometable values("",sys.XMLType.createxml('string of around 48000 chars'));
    error that i recieve
    ORA-01704: string literal too long

    I am trying to insert xmltype (sys.XMLType.createxml()) data through sqlplus in oracle.
    i am getting error as literal string too long.
    setting long as 1000000
    i am able to read and display the contents.
    But still NOT able to INSERT. The data is around 47784 charaters.
    any clues or any useful links.
    the query that i am using
    insert into sometable values("",sys.XMLType.createxml('string of around 48000 chars'));
    error that i recieve
    ORA-01704: string literal too long

  • Sys.Xmltype.Createxml performance

    Hello all,
    I have these two functions,these functions are present in a package and this package is being called from .net code.There is a lot of performance issue with this code,It is taking 27 minutes for inserting 1000 rows,please help me fine tune this piece of code.And also there is a before insert trigger for the table XXXXXX
    since we are using the concept of VPD here
    There are close to 14000 rows to be inserted,please help.
    Database version
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE     10.2.0.5.0     Production
    TNS for Solaris: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    Procedure Some_Information(in_Some_Details In Clob, in_Batch_Id In Varchar2, in_Modified_User_Uid In Varchar2, in_Modified_Date In Varchar2, out_Status Out Varchar2, out_Error Out Varchar2)
    As
    Begin
    Xml_Type:=Sys.Xmltype.Createxml(in_Some_Details);
    Insert Into XXXXXX(I_Batch_Id,I_Client_Account_Id,V_Client_Legal_Name,
    V_Old_Office_Code, V_Old_Office_Business_Name,V_New_Office_Code,V_New_Office_Business_Name,
    V_Old_Cost_Center_Code,V_Old_Cost_Center_Name,V_New_Cost_Center_Code, V_New_Cost_Center_Name,
    V_Client_Status,D_Client_Inactivation_Date,V_Select_Ynflag,
    V_Replace_Ynflag,V_Replace_All_Policy_Ynflag,V_Replace_All_Service_Ynflag,
    I_Created_By_Uid,I_Modified_By_Uid,
    D_Created_Timestamp,D_Modified_Timestamp,
    V_Batch_Status,D_Pol_Eff_Date_From,D_Pol_Eff_Date_To
    (Select in_Batch_Id, A.CLIENT_ACCOUNT_ID, A.CLIENT_LEGAL_NAME, A.OLD_OFFICE_CODE, A.OLD_OFFICE_BUSINESS_NAME,
    A.NEW_OFFICE_CODE, A.NEW_OFFICE_BUSINESS_NAME, A.OLD_COST_CENTER_CODE, A.OLD_COST_CENTER_NAME,
    A.NEW_COST_CENTER_CODE, A.NEW_COST_CENTER_NAME, A.CLIENT_STATUS,
    CASE
    WHEN A.CLIENT_INACTIVATION_DATE =' ' THEN NULL
    ELSE To_Date(A.CLIENT_INACTIVATION_DATE,'DD/MM/YYYY')
    END ,
    A.SELECT_FLAG, A.REPLACE_FLAG, A.REPLACE_ALL_POLICY_FLAG, A.REPLACE_ALL_SERVICE_FLAG,
    in_Modified_User_Uid,in_Modified_User_Uid,
    To_Date(in_Modified_Date,'yyyyMMddhh24miss'),To_Date(in_Modified_Date,'yyyyMMddhh24miss'),'A',
    CASE
    WHEN A.POL_EFF_DATE_FROM =' ' THEN NULL
    ELSE To_Date(A.POL_EFF_DATE_FROM,'DD/MM/YYYY')
    END ,
    CASE
    WHEN A.POL_EFF_DATE_TO =' ' THEN NULL
    ELSE To_Date(A.POL_EFF_DATE_TO,'DD/MM/YYYY')
    END
    From (
    SELECT
    (CLIDETAIL.EXTRACT('//InformationSet/I_CLIENT_ACCOUNT_ID/text()').getstringval()) as CLIENT_ACCOUNT_ID,
    Escape_Chars(CLIDETAIL.EXTRACT('//InformationSet/V_CLIENT_LEGAL_NAME/text()').getstringval()) as CLIENT_LEGAL_NAME,
    (CLIDETAIL.EXTRACT('//InformationSet/V_OLD_OFFICE_CODE/text()').getstringval()) as OLD_OFFICE_CODE,
    Escape_Chars(CLIDETAIL.EXTRACT('//InformationSet/V_OLD_OFFICE_NAME/text()').getstringval()) as OLD_OFFICE_BUSINESS_NAME,
    (CLIDETAIL.EXTRACT('//InformationSet/V_NEW_OFFICE_CODE/text()').getstringval()) as NEW_OFFICE_CODE,
    Escape_Chars(CLIDETAIL.EXTRACT('//InformationSet/V_NEW_OFFICE_NAME/text()').getstringval()) as NEW_OFFICE_BUSINESS_NAME,
    (CLIDETAIL.EXTRACT('//InformationSet/V_OLD_COSTCENTER_CODE/text()').getstringval()) as OLD_COST_CENTER_CODE,
    Escape_Chars(CLIDETAIL.EXTRACT('//InformationSet/V_OLD_COSTCENTER_NAME/text()').getstringval()) as OLD_COST_CENTER_NAME,
    (CLIDETAIL.EXTRACT('//InformationSet/V_NEW_COSTCENTER_CODE/text()').getstringval()) as NEW_COST_CENTER_CODE,
    Escape_Chars(CLIDETAIL.EXTRACT('//InformationSet/V_NEW_COSTCENTER_NAME/text()').getstringval()) as NEW_COST_CENTER_NAME,
    Escape_Chars(CLIDETAIL.EXTRACT('//InformationSet/V_CLIENT_STATUS/text()').getstringval()) as CLIENT_STATUS,
    (CLIDETAIL.EXTRACT('//InformationSet/V_CLIENT_INACTIVATION_DATE/text()').getstringval()) as CLIENT_INACTIVATION_DATE,
    Escape_Chars(CLIDETAIL.EXTRACT('//InformationSet/V_SELECT_FLAG/text()').getstringval()) as SELECT_FLAG,
    Escape_Chars(CLIDETAIL.EXTRACT('//InformationSet/V_REPLACE_FLAG/text()').getstringval()) as REPLACE_FLAG,
    Escape_Chars(CLIDETAIL.EXTRACT('//InformationSet/V_REPLACE_ALL_POLICY_FLAG/text()').getstringval()) as REPLACE_ALL_POLICY_FLAG,
    Escape_Chars(CLIDETAIL.EXTRACT('//InformationSet/V_REPLACE_ALL_SERVICE_FLAG/text()').getstringval()) as REPLACE_ALL_SERVICE_FLAG,
    (CLIDETAIL.EXTRACT('//InformationSet/V_POL_EFF_DATE_FROM/text()').getstringval()) as POL_EFF_DATE_FROM,
    (CLIDETAIL.EXTRACT('//InformationSet/V_POL_EFF_DATE_TO/text()').getstringval()) as POL_EFF_DATE_TO
    FROM TABLE(XMLSEQUENCE(Xml_Type.EXTRACT('//NewDataSet/InformationSet')))CLIDETAIL
    ) A
    Where Not Exists (Select 1 From XXXXX1 M Where M.I_Batch_Id=in_Batch_Id And M.I_Client_Account_Id=A.Client_Account_Id)
    out_Status:='0';
    out_Error:='No Error 2';
    dbms_output.put_line(out_Status);
    EXCEPTION WHEN OTHERS THEN
    out_Status:='100';
    out_Error:= SQLERRM;
    End;
    Function Escape_Chars(in_Details Varchar2) Return Varchar2 Is
    Begin
    If Replace(Replace(Replace(Replace(Replace(Trim(in_Details),
    ''||'&'||' amp;',''||'&'||''),
    ''||'&'||' quot;','"'),
    ''||'&'||' lt;','<'),
    ''||'&'||' gt;','>'),
    ''||'&'||' apos;',''''
    ) = '' Then
    Return Null;
    Else
    Return Replace(Replace(Replace(Replace(Replace(Trim(in_Details),
    ''||'&'||'amp;',''||'&'||''),
    ''||'&'||'quot;','"'),
    ''||'&'||'lt;','<'),
    ''||'&'||'gt;','>'),
    ''||'&'||'apos;',''''
    End If;
    End;

    Hello Marco,
    I am a novice in Oracle with xml,please help me out with the following question listed in the points below
    1) re-write the whole
    From (
    SELECT (CLIDETAIL.EXTRACT('//InformationSet/I_CLIENT_ACCOUNT_ID/text()').getstringval()) as CLIENT_ACCOUNT_ID,
    Escape
    bit to 1 XMLTABLE statement, if not only you will be easily see issues and/or get rid of all the clutter via "extract"
    Point 1 I am exploring it,since I do not know anything about XMLTABLE.
    2) Use the full XPath path in this statement - do not use // everywhere in the statement (this alone will be drastically improve your performance).
    I have made the change mentioned in point 2 except for this section in the previous post,please let me know if i have to make the change here also,
    FROM TABLE(XMLSEQUENCE(Xml_Type.EXTRACT('//NewDataSet/InformationSet')))
    My Xml will be of the format
    <NewDataSet>
    <InformationSet>
    <I_CLIENT_ACCOUNT_ID>Some value</I_CLIENT_ACCOUNT_ID>
    </NewDataSet>
    </InformationSet>
    3) Do not use the OO notation. eg. "user.table.xmltype.extract.operator" but the supported notation, eg. "extract(user.table.xmltype, '$XPath', '$namspce').operator"
    Point 3 I have made the changes
    4) Do not use XML/SQL operators anymore, they will be deprecated/desupported in future versions (11, 12, xx). Use the offcial W3 XML standards, in the case XQuery alternatives like XMLTABLE. If not only they do already support XPath V2 while the XML/SQL stuff only supports XPath V1.
    Point 4 can you please elaborate on XML/SQL operators that I am using in my code,so sorry this is dumb but still.
    5) escape handling can also be done by a by Oracle supported function in package DBMS_XMLGEN (convert? and other procedures/functions), why write your own (would something like a regular expression comparison etc not be easier instead of replace(replace(replace...)
    Thank you very much,I have handled the point 5 by using the DBMS_XMLGEN.convert

  • Unable to insert  through   Adaptive RFC

    Hi
    i am sending the code which i implemented in my programme where i am facing problem while inserting into R3 neither i am getting any error nor i am able to insert into R3. through JCO i tried but unable to execute the rfc. i will be greateful if any body provide solution to this issue.
    // all binding i am doing inside controller's init
    insert_input = new Zhr_Fun_Appl_Emp_Ref_Input();
    //create object of structure in RFC
    edu=new Zbapieduc();
    quali=new Zbapiquali();
    emp=new Bapiemploy();
    //adding object to the input element
    insert_input.addEducation(edu);
    insert_input.addQualification(quali);
    insert_input.addPrevious_Employment(emp);
    //binding inputobject with current context
    wdContext.nodeZhr_Fun_Appl_Emp_Ref_Input().bind(insert_input);
    //executing the model inside the method which is defined in controller
    //setting the value of input parameter and table parameter
    try
    wdContext.currentZhr_Fun_Appl_Emp_Ref_InputElement().modelObject).execute();
    wdContext.nodeOutput().invalidate();
    }catch(Exception ex)
    //@@bapi objects
         Zhr_Fun_Appl_Emp_Ref_Input insert_input=null;
         Zbapieduc edu=null;//@@education
         Zbapiquali quali=null;//@@Qualification
         Bapiemploy emp=null;//@@experience
      //@@end

    Hi Sukanta,
                        First of all u r not calling the transaction commit,If ur bapi has internal commit,then its not a problem but if its doesn't then even if data is getting passed to R/3 system,it will not get saved.
    2nd u r telling that u r unable to execute the bapi,have u checked in debug mode whether its going to r/3 or not??
    logon to r/3 system->go to se37->put an external breakpoint in that bapi
    then execute ur application.So atleast u can find out whether its goin to r/3 or not.
    regards
    Sumit

  • ORA-21700 error using sys.xmlType in Oracle 9.2

    I'm working on an application which uses the XMLType column in some of its database tables. When we started, we were using Oracle 9.0.1, and this test code works (which emulates how we have to, in some occasions, populate the XMLType column).
    However, we installed Oracle 9.2.0.3 on the same machine and created database instances using this version of Oracle. We didn't upgrade the original 9.0.1 installation (which still exists side-by-side). When we run this code, we get the following exception...
    java.sql.SQLException: ORA-21700: object does not exist or is marked for delete
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1451)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:862)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1846)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1771)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2361)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:422)
    at com.edh.oracle.TransactionTester.testClob(TransactionTester.java:134)
    at com.edh.oracle.TransactionTester.main(TransactionTester.java:251)
    This exception occurs after we've written the data to a Clob and are attempting to call createXML to update the column.
    Is there anything additional I need to do to get this working in Oracle 9.2 again? Thanks.
    Code is:
    * TransactionTester.java
    * Created on 11 October 2002, 14:08
    package com.edh.oracle;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    * @author ehillman
    public class TransactionTester {
    private static String ORACLE_URL = "jdbc:oracle:thin:@wallaby:7012:CT2";
    /** Creates a new instance of TransactionTester */
    public TransactionTester() throws SQLException {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    private void createTables(Connection conn) throws SQLException {
    String createText = "create table SillyData (XML_VALUE XMLTYPE, XML_STORAGE CLOB)";
    Statement stmt = conn.createStatement();
    stmt.execute(createText);
    System.out.println("Tables created");
    private void dropTables(Connection conn) throws SQLException {
    String dropText = "drop table SillyData ";
    Statement stmt = conn.createStatement();
    stmt.execute(dropText);
    System.out.println("Tables dropped");
    private void testClob() throws SQLException, java.io.FileNotFoundException,
    java.io.IOException {
    System.out.println("testClob - START");
    Connection conn = DriverManager.getConnection(ORACLE_URL,
    "ehillman", "ehillman");
    System.out.println("connection received");
    createTables(conn);
    try {
    System.out.println("Loading MyFn.xml");
    java.io.FileReader inputReader = new java.io.FileReader(
    "C:\\Documents and Settings\\ehillman\\.netbeans\\edh test\\oracle jdbc\\com\\edh\\oracle\\MyFn.xml");
    conn.setAutoCommit(false);
    Statement stmt2 = conn.createStatement();
    stmt2.execute("insert into SillyData (XML_STORAGE) values (EMPTY_CLOB())");
    System.out.println("empty row inserted");
    stmt2 = conn.createStatement();
    ResultSet rs = stmt2.executeQuery("select XML_STORAGE from SillyData for update");
    System.out.println("Empty CLOB retireved");
    rs.next();
    java.sql.Clob clobValue = rs.getClob(1);
    oracle.sql.CLOB oraClob = (oracle.sql.CLOB) clobValue;
    System.out.println("casted");
    java.io.Writer writer = oraClob.getCharacterOutputStream();
    char[] buffer = new char[ oraClob.getChunkSize() ];
    for (int charsRead = inputReader.read(buffer); charsRead > -1; charsRead = inputReader.read(buffer)) {
    writer.write(buffer, 0, charsRead);
    writer.close();
    System.out.println("data written to Clob");
    PreparedStatement pState = conn.prepareStatement(
    "update SillyData set XML_VALUE = sys.XMLType.createXML(?)");
    pState.setClob(1, clobValue);
    int result = pState.executeUpdate();
    System.out.println("executeQuery returned " + result);
    } finally {
    dropTables(conn);
    conn.close();
    System.out.println("connection closed");
    System.out.println("testClob - END");
    * @param args the command line arguments
    public static void main(String[] args) {
    try {
    TransactionTester tst = new TransactionTester();
    tst.testClob();
    } catch (Exception ex) {
    ex.printStackTrace();

    I've found this....
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96620/xdb05obj.htm#1032058
    Does this mean that, for a table to use an XMLType column, it has to have a single schema definition for every row in the table?
    This won't fit for what we're doing.... that is, our table stores XML data for each row, but they are all different types of XML... they don't have the same structure,they don't use the same schema.
    Please let me know if I'm missing something

  • Want to insert a XSL file's data into a column of type SYS.XMLTYPE??

    Hello Friends
    I want to insert a XSL file's data into a column of a table of type SYS.XMLTYPE. Following is the XSL which i want to add into a table please help in.....
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         xmlns:fn="http://www.w3.org/2005/xpath-functions">
         <xsl:output method="html" encoding="UTF-8" />
         <xsl:template match="clinical_study">
         <xsl:variable name="status">
              <xsl:apply-templates select='overall_status' />
         </xsl:variable>
    <html>
    <head>
    <title>Summary</title>
    <link href="merckcancer.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
         <div id="trialtop" class="trialtop">
              <div id="trialtophead" class="trialtophead">
                   <H1>Summary</H1>
              </div>
    <!-- start of trial body-->
         <div id="trialmiddle" class="trialmiddle">
                             <span class="trialtitle1"><xsl:apply-templates select='brief_title'/></span>
                   <span class="tealbold">Official Title: </span><xsl:apply-templates select='official_title' />
                   <span class="tealbold" title="ClinicalTrials.gov Identifier">NCT Id: </span><xsl:apply-templates select='//nct_id'/>
    <span class="tealbold">Conditions: </span><xsl:for-each select="//condition[position()!=last()]"><xsl:value-of select="normalize-space(.)" /><xsl:text>, </xsl:text></xsl:for-each>
    <xsl:for-each select="//condition[position()=last()]"><xsl:value-of select="normalize-space(.)" /></xsl:for-each>
    <span class="tealbold">Phase: </span><xsl:apply-templates select='phase' />
    <span class="tealbold">Status: </span><xsl:value-of select="$status" />
    <span class="tealbold">Interventions: </span><xsl:for-each select="//intervention[position()!=last()]"><xsl:value-of select="normalize-space(intervention_type)" />: <xsl:value-of select="normalize-space(intervention_name)" /><xsl:text>, </xsl:text></xsl:for-each><xsl:for-each select="//intervention[position()=last()]"><xsl:value-of select="normalize-space(intervention_type)" />: <xsl:value-of select="normalize-space(intervention_name)" /></xsl:for-each>
    <xsl:apply-templates select='eligibility'><xsl:with-param name="type">short</xsl:with-param></xsl:apply-templates>
    </div><!-- end of middle -->
    </div><!-- end of top-->                         
    <div id="detail" class="detail">
         <div id="detailtophead" class="detailtophead">
              <H1>Details</H1>
         </div>
    <!-- end of detailtop-->
    <!-- start of detail body-->
    <div id="detailmiddle" class="detailmiddle">
    <span class="trialtitle2">Trial Description:</span>
         <span class="trialtitle4"><xsl:apply-templates select='brief_summary/textblock' /></span>
         <span class="trialtitle1">Eligibility: </span>
              <xsl:apply-templates select='eligibility'><xsl:with-param name="type">long</xsl:with-param></xsl:apply-templates>
    </div><!--end of detail middle-->
    </div><!-- end of detail top-->
    <div id="enroll" class="enroll">
    <div id="enrolltophead" class="enrolltophead">
    <H1>Enrollment</H1>
    </div>
    <!-- end of enroll top head-->
    <!-- start of enroll body-->
    <div id="enrollmiddle" class="enrollmiddle">
    <xsl:choose>
                                       <xsl:when test="$status = 'Recruiting'">
         This study has participating centers in a number of locations.
         To take the next step in learning more about participating in this clinical study please call one of these trial contacts.<p/>
         The trial contacts will know this study as <span class="tealbold"><xsl:apply-templates select='//org_study_id'/></span>
         or may know the study under the ClinicalTrials.gov identifier <span class="tealbold"><xsl:apply-templates select='//nct_id'/></span>.<p/>
         <p/>
                                       <xsl:apply-templates select='overall_contact'/>
                                       <xsl:for-each select="location">
                                            <xsl:call-template name='location'/><p/>
                                       </xsl:for-each>
                                       </xsl:when>
                                       <xsl:otherwise>
         This study is not currently Recruiting, it is <xsl:value-of select="$status" />.
                                       </xsl:otherwise>
                                       </xsl:choose>
    </div><!--end of enroll middle-->
    </div><!-- end of enroll -->
    <div id="credit" class="credit">
    <div id="credittophead" class="credittophead">
    <H1>Credits</H1>
    </div>
    <!-- end of credit top head-->
    <!-- start of credit body-->
    <div id="creditmiddle" class="creditmiddle">
                                  Information about this trial has been gathered from ClinicalTrials.gov. Please see
                                  <a>
                                       <xsl:attribute name="href" >
                                            /ctcpub/redirect.jsp?redirectURL=http://ClinicalTrials.gov
                                       </xsl:attribute>
                                       ClinicalTrials.gov
                                  </a> for more complete information.<p/>
                                  <xsl:apply-templates select='required_header/download_date'/><p/>
                                  <a>
                                       <xsl:attribute name="href" >
                                            /ctcpub/redirect.jsp?redirectURL=<xsl:apply-templates select='required_header/url'/>
                                       </xsl:attribute>
                                       <xsl:apply-templates select='required_header/link_text'/>
                                  </a> <p/>
                                  This trial data was last updated on <xsl:apply-templates select='//lastchanged_date'/><p/>
    </div><!--end of credit body-->
    </div><!--end of credit-->
    </body>
    </html>
    </xsl:template>
    <xsl:template match="brief_title">
              <span class="trialtitle"><xsl:value-of select="normalize-space(.)" /></span>
         </xsl:template>
         <xsl:template match="official_title">
              <span class="tealbold">Official Title: </span>     <xsl:value-of select="normalize-space(.)" />
         </xsl:template>
         <xsl:template match="phase">
              <span class="tealbold">Phase: </span> <xsl:value-of select="normalize-space(.)" />
         </xsl:template>
         <xsl:template match="overall_status">
              <xsl:value-of select="normalize-space(.)" />
         </xsl:template>
         <xsl:template match="eligibility">
              <xsl:param name="type" />
              <xsl:choose>
                   <xsl:when test="$type = 'short'">
                        <span class="tealbold">Eligibility: </span> <xsl:call-template name="ages">
                             <xsl:with-param name="min"><xsl:value-of select="normalize-space(minimum_age)" /></xsl:with-param>
                             <xsl:with-param name="max"><xsl:value-of select="normalize-space(maximum_age)" /></xsl:with-param>
                        </xsl:call-template>, <xsl:apply-templates select='gender' />
                   </xsl:when>
                   <xsl:when test="$type = 'long'">
                        <span class="trialtitle">Eligibility: </span>
                             <span class="tealbold">Age: </span> <xsl:call-template name="ages">
                                       <xsl:with-param name="min"><xsl:value-of select="normalize-space(minimum_age)" /></xsl:with-param>
                                       <xsl:with-param name="max"><xsl:value-of select="normalize-space(maximum_age)" /></xsl:with-param>
                                  </xsl:call-template>
                             <span class="tealbold">Genders Eligible for Study: </span> <xsl:apply-templates select='gender' />
                             <xsl:text>
                             </xsl:text>
                             <span class="tealbold">Eligibility Criteria: </span>
    <xsl:apply-templates select='criteria/textblock' />
                   </xsl:when>
                   <xsl:otherwise></xsl:otherwise>
              </xsl:choose>
         </xsl:template>
         <xsl:template match="gender">
              <xsl:choose>
                   <xsl:when test=". = 'Both'">Male or Female</xsl:when>
                   <xsl:otherwise>
                        <xsl:value-of select="normalize-space(.)" />
                   </xsl:otherwise>
              </xsl:choose>
         </xsl:template>
         <xsl:template match="overall_contact">
         <span class="trialtitle">Central Contact: </span>
              <xsl:apply-templates select='./first_name' /><xsl:text> </xsl:text>
              <xsl:apply-templates select='./middle_name' /><xsl:text> </xsl:text>
              <xsl:apply-templates select='./last_name' />
              <xsl:apply-templates select='./phone' />
              <xsl:apply-templates select='./email' />
         </xsl:template>
         <xsl:template name="ages">
              <xsl:param name="min" />
              <xsl:param name="max" />
              <xsl:choose>
                   <xsl:when test="($min != '') and ($max != '')">Between <xsl:value-of select="$min" /> and <xsl:value-of select="$max" /></xsl:when>
                   <xsl:when test="($min != '') and ($max = '')"><xsl:value-of select="$min" /> and Above</xsl:when>
                   <xsl:when test="($min = '') and ($max != '')">Under <xsl:value-of select="$max" /></xsl:when>
                   <xsl:otherwise></xsl:otherwise>
              </xsl:choose>
         </xsl:template>
         <xsl:template match="brief_summary/textblock">
              <span class="trialtitle">Trial Description: </span> <xsl:call-template name="substitute">
    <xsl:with-param name="string" select="." />
    </xsl:call-template>
         </xsl:template>
         <xsl:template name="location">
              <span class="trialtitle"><xsl:apply-templates select='.//country' /><xsl:apply-templates select='.//state' /></span>
              <xsl:apply-templates select='./facility/name' /><xsl:apply-templates select='.//city' /><xsl:apply-templates select='.//zip' /><xsl:apply-templates select='.//status' />
              <xsl:apply-templates select='./contact' />
         </xsl:template>
         <xsl:template match="contact">
              <span class="tealbold">Site Contact: </span>
              <xsl:apply-templates select='first_name' />
              <xsl:apply-templates select='middle_name' />
              <xsl:apply-templates select='last_name' />
              <xsl:apply-templates select='phone' />
              <xsl:apply-templates select='email' />
         </xsl:template>
         <xsl:template match="criteria/textblock">
              <xsl:call-template name="substitute">
         <xsl:with-param name="string" select="." />
         </xsl:call-template>     
    </xsl:template>     
         <xsl:template match="facility/name"><xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="country"><xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="city">, <xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="zip">, <xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="state">, <xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="status">, <xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="first_name"><xsl:value-of select="normalize-space(.)" />&#160;</xsl:template>     
         <xsl:template match="middle_name"><xsl:value-of select="normalize-space(.)" />&#160;</xsl:template>     
         <xsl:template match="last_name"><xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="phone">Phone: <xsl:value-of select="normalize-space(.)" />
    </xsl:template>     
         <xsl:template match="email"><xsl:if test='. != ""'>EMail: <xsl:value-of select="normalize-space(.)" />
    </xsl:if></xsl:template>     
    <xsl:template name="substitute">
    <xsl:param name="string" />
    <xsl:param name="from" select="'&#xA;'" />
    <xsl:param name="to">
    </xsl:param>
    <xsl:choose>
    <xsl:when test="contains($string, $from)">
    <xsl:value-of select="substring-before($string, $from)" />
    <xsl:copy-of select="$to" />
    <xsl:call-template name="substitute">
    <xsl:with-param name="string"
    select="substring-after($string, $from)" />
    <xsl:with-param name="from" select="$from" />
    <xsl:with-param name="to" select="$to" />
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="$string" />
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>
    Please do as early as possible..
    thanks in advance

    Hi I tried with below querry but iam getting an error message?
    SQL> Insert into temp_clob_tab
    2 SELECT XMLELEMENT("soap:Envelope",
    3 XMLATTRIBUTES ('http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi",
    4 'http://www.w3.org/2001/XMLSchema' as "xmlns:xsd",
    5 'http://schemas.xmlsoap.org/soap/envelope/' as "xmlns:soap"),
    6 XMLELEMENT("soap:Body"),XMLELEMENT("AddListing",
    7 XMLATTRIBUTES ('http://www.christielites.com' as "xmlns" )),
    8 XMLELEMENT ( "SCOMCODE",a.SCOMCODE), XMLELEMENT ( "SLOCCODE",SLOCCODE),
    9 XMLELEMENT ( "DSTART",DSTART),XMLELEMENT ( "DEND",DEND),XMLELEMENT ( "SECODE",SECODE),
    10 XMLELEMENT ( "IAVAIL",IAVAIL),XMLELEMENT ("IOWNED",IOWNED),XMLELEMENT ("SPOSTTRANS",SPOSTTRANS))
    11 from LiteExchangeAvailablity a;
    SELECT XMLELEMENT("soap:Envelope",
    ERROR at line 2:
    ORA-00932: inconsistent datatypes: expected CLOB got -

  • Unable to INSERT record but inserting. Forms 4.5 error through Apps 10.7

    Hi All,
    I have written the following code on save button on form 4.5 which has been used from APPS. I created the master-detail relation also.
    It suppose to insert a row into header and then into lines.
    Its inserting the row into both the tables but getting the following error in betweeen.
    ===========
    FRM-40508: ORACLE error: unable to INSERT record.
    ORA-01400: cannot insert NULL into ("VFI"."VFI_PC_DEFINITION_LINES"."LINE_ID")
    ===========
    I am thinking problem is some where in some default triigers or on insert triggers
    but unable to trace it. CAN anybody through a light on this ?
    ================================================
    PROCEDURE VFI_INVPCS IS
    i          number;
    v_item_id     number;
    v_item_id1     number;
    v_temp      varchar2;
    v_user_id NUMBER := 1111; --fnd_global.user_id;
    Lv_ChkFlag VARCHAR2(1);
    Lv_UnChkFlag VARCHAR2(1);
    ln_header_seq NUMBER;
    ln_lines_seq NUMBER;
    BEGIN
    BEGIN
    SELECT inventory_item_id
    INTO v_item_id
    FROM inv.mtl_system_items
    WHERE organization_id = 103
    and segment1 = :VFI_PC_DEFINITION_HEADER.parent_inventory_item_id;
    SELECT VFI_PC_DEFINITION_HEADER_SEQ.nextval
    INTO ln_header_seq
    FROM DUAL;
    SELECT VFI_PC_DEFINITION_LINES_SEQ.nextval
    INTO ln_lines_seq
    FROM DUAL;
    INSERT INTO VFI_PC_DEFINITION_HEADER( HEADER_ID
    ,PARENT_INVENTORY_ITEM_ID
    ,START_DATE
    ,END_DATE
    ,CREATED_BY
    ,CREATION_DATE
    ,LAST_UPDATED_BY
    ,LAST_UPDATE_DATE)
    VALUES ( ln_header_seq
         ,v_item_id
         ,:VFI_PC_DEFINITION_HEADER.start_Date
         ,:VFI_PC_DEFINITION_HEADER.end_date
    ,v_user_id
         ,sysdate
         ,v_user_id
         ,SYSDATE
    COMMIT; -- header
    GO_BLOCK('VFI_PC_DEFINITION_LINES');
    LOOP
    SELECT inventory_item_id
    INTO v_item_id1
    FROM inv.mtl_system_items
    WHERE organization_id = 103
    AND segment1 = :VFI_PC_DEFINITION_LINES.child_inventory_item_id;
    First_record;
    IF :VFI_PC_DEFINITION_LINES.child_inventory_item_id is not null then
    IF :CFY_PTID_FLAG='Y' THEN
    Lv_ChkFlag:=:CFY_PTID_FLAG;
    INSERT INTO VFI_PC_DEFINITION_LINES( LINE_ID
    ,HEADER_ID
    ,PARENT_INVENTORY_ITEM_ID
    ,CHILD_INVENTORY_ITEM_ID
    ,CREATED_BY
    ,CREATION_DATE
    ,LAST_UPDATED_BY
    ,LAST_UPDATE_DATE
    ,CFY_PTID_FLAG)
    VALUES ( ln_lines_seq
    ,ln_header_seq
    ,v_item_id
    ,v_item_id1
    ,v_user_id
    ,SYSDATE
    ,v_user_id
    ,SYSDATE
    ,Lv_ChkFlag
    END IF;
    END if;
    NEXT_RECORD;
    EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';      
    END LOOP;
    message('After Insert Child');
    message('After Insert Child');
    COMMIT;
    END;
    ================================================

    not sure on the block structure of your forms.
    one would question why you seem to be doing a lot of the default insert work on the press of a button (when-button-pressed).
    also if you have a master-detail relationship in the form - why you don't let forms handle the master-detail insert.
    seems like you have database database blocks but are almost coding as if they are non-base table blocks.

  • Unable to insert more than once into an Oracle table  through ODI

    Hi,
    The scenario is I need to load a table which stores the contact informations (Phones).
    The source data is such that the different types of phones come from different source tables (Home phone, Work Phone, Fax etc)
    I have developed different interfaces in ODI based on the types of phones.
    The issue is for the first time, if I run any of the interfaces it runs properly & the data gets inserted properly. Then if I run any of the other interfaces, it is unable to insert into the intermediate I$ table (I$_Phones) and is stuck there forever :-)
    Is it an ODI issue or an issue with the database? I have manually copied the query and tried to load it into the intermediate table, but it didn't work.
    Have any of you faced this type of issues in ODI ever? If so, are there any work arounds?
    PS - I have checked whether I am dropping the intermediate flow tables after inserting the records.

    Thanks Ankit,
    I was using IKM Oracle Incremental Update. The volume of data is around 300,000.
    It didn't fail, It just took forever. It got stuck in the step "Insert flow in I$ table". (FYI, I have disabled the Flow control in the IKM).
    Almost the same query ran properly and got the data loaded when its used in the initial interface. I have pasted the query below.
    /* DETECTION_STRATEGY = NOT_EXISTS */
    insert /*+ APPEND */ into PROD_ODI_WORK.I$_PHONES
         SRC_CLIENT_ID,
         PHONE_NO,
         PHONE_TYPE_ID,
         IND_UPDATE
    select      
         C1_SRC_CLIENT_ID     SRC_CLIENT_ID,
         C2_PHONE_NO     PHONE_NO,
         1     PHONE_TYPE_ID,
         'I' IND_UPDATE
    from     PROD_ODI_WORK.C$_0PHONES
    where     (1=1)
    and not exists (
         select     'X'
         from     CIF_STG.PHONES T
         where     T.SRC_CLIENT_ID     = C1_SRC_CLIENT_ID
         and     T.SRC_SYSTEM_ID     = 'BARS'
              and     ((C2_PHONE_NO = T.PHONE_NO) or (C2_PHONE_NO IS NULL and T.PHONE_NO IS NULL))
              and     ((1 = T.PHONE_TYPE_ID) or (1 IS NULL and T.PHONE_TYPE_ID IS NULL))
         )

  • Unable to insert subheader in insertchildxml but   oracle says no error

    Hi ,
    I am unable insert subheader using insertchildxml().
    Here is the code that I am working on
    SQL> declare xmlschema xmltype := xdburitype('/public/personDetails.xsd').getXML(); res boolean; begin select insertChildXML( xmlschema,'/xsd:schema/xsd:complexType[@name="HomecompanyinfoType"]/xsd:sequence', 'xsd:element',xmltype('<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Ofiiceddress" type="xsd:string"/>'),'xmlns:xsd="http://www.w3.org/2001/XMLSchema"') into xmlSchema from dual; if (dbms_xdb.existsResource('/public/personDetails.xsd')) then dbms_xdb.deleteResource('/public/personDetails.xsd'); end if; res := dbms_xdb.createResource('/public/personDetails.xsd',xmlschema); end;
    2 /
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.
    SQL> begin dbms_xmlschema.CopyEvolve(xdb$string_list_t('www.PersonInfoUrl.com'),XMLSequenceType(xdburitype('/public/personDetails.xsd').getXML()), null); end;
    2 /
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.
    //above I have added the "HomecompanyinfoType" as new subheader
    "Officeaddress" is the new tagfield under this new subheader
    SQL>
    SQL>
    SQL> insert into PERSON_COMP_TABLE (empId ,comments ,joindate ,personjoininfo )
    2 values ('100SP23','RDDEPT','15-jan-2006',
    3 XMLType(
    4 '<?xml version="1.0" encoding="UTF-8"?>
    5 <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="www.PersonInfoUrl.com">
    6 <persondetails>
    7 <personname>Robert </personname>
    8 <personexperience>4.5</personexperience>
    9 </persondetails>
    10 <HomecompanyinfoType>
    11 <Ofiiceddress>SLStreet</Ofiiceddress>
    12 </HomecompanyinfoType>
    13 <companyinfo>
    14 <companystartdate>2004-07-24</companystartdate>
    15 <companystandard>3.9</companystandard>
    16 <address>SLStreet<address>
    17 </companyinfo>
    18 <salaryinfo>
    19 <salary>2444.3</salary>
    20 <paymonth> june </paymonth>
    21 </salaryinfo>
    22 </person>'))
    23 /
    XMLType(
    ERROR at line 3:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00225: end-element tag "companyinfo" does not match start-element tag
    "address"
    Error at line 14
    ORA-06512: at "SYS.XMLTYPE", line 301
    ORA-06512: at line 1
    // But I am able to add the old data without new sub header
    SQL> insert into PERSON_COMP_TABLE (empId ,comments ,joindate ,personjoininfo )
    2 values ('202RTe312','RDDEPT','15-jan-2006',
    3 XMLType(
    4 '<?xml version="1.0" encoding="UTF-8"?>
    5 <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="www.PersonInfoUrl.com">
    6 <persondetails>
    7 <personname>Robert </personname>
    8 <personexperience>4.5</personexperience>
    9 </persondetails>
    10 <companyinfo>
    11 <companystartdate>2004-07-24</companystartdate>
    12 <companystandard>3.9</companystandard>
    13 </companyinfo>
    14 <salaryinfo>
    15 <salary>2444.3</salary>
    16 <paymonth> june </paymonth>
    17 </salaryinfo>
    18 </person>'))
    19 /
    1 row created.
    SQL> commit;
    Please suggest how to add new subheader to the existing schema and put the constraint to the tagfields like string length or for double- fractional digits and total digits
    please advise
    Thanks
    Govinda

    Govinda
    Once again, please review your examples before you post. It will you and I, as well as the other users of the forum at lot of time and effort.
    Please note that in your example you have
    <address>SLStreet<address>
    Not
    <address>SLStreet</address>
    That is probably the cause of your problem, as the error message clearly indicates.

  • Unable to insert data in the table

    Hi,
    I've a document which has a doctype that points to a URL. When I try to insert this document in the table (xmltype column), I am getting the following errors:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00263: couldn't connect to host URL port 80
    Error at line 2
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    Can someone please suggest how should I resolve this issue?
    Thanks in advance for all your help.

    Hi,
    Have you just added a new field or you have adjusted the dimensions of the cube along with that. Any change in dimension or change in structure you need to delete the data and reload.
    Regards
    Akhan

  • Xmltype.createxml not working after upgrading to 11202 from 10203

    Hi,
    i was referred here from Java Database Connectivity (JDBC) forum. the link to the original post:
    using XML with websphere jdbc adapter 2.6 on 11.2.0.2
    again, the adapter is using the function xmltype.createxml (and there it uses xmltype_lib) and it fails right at the beginning because it cannot parse the xml properly.
    so what im asking is, was there any major changes from 10.2 to 11.2 to the way xml creation works? maybe a different encoding? how can i check the encoding of the xml created? is there a property for it?
    thanks in advance.
    Edited by: andrey on Mar 12, 2012 4:47 AM

    yes the client and the server are same version.
    the error stack from the adapter:
    [Time: 2012/03/13 13:00:00.177] [system: ConnectorAgent] [SS: jdbc_orclConnector] [Thread: JDBC_ORCL.REQUECTQUEUEJmsThreadPool.thread18(#746207754)] [Type:error] [MsgID: 10556] [Mesg: Exception Detail: com.crossworlds.cwconnectorapi.exceptions.VerbProcessingFailedException
    [Type: Error] [MsgID:37010] [Mesg: Stored Procedure Execution Failed: java.SQLException: [IBM-CrossWorlds][Oracle JDBC Driver][Oracle]
    ora-30676: socket read or write failed
    ora-06512: at "SYS.XMLTYPE", line 5
    ora-06512: at "SCHEMA_NAME.FUNC_NAME", line 1695
    ora-06512: at "SCHEMA_NAME.FUNC_NAME", line 78
    ora-06512: at line 1

  • Oracle forms error frm-40508: unable to insert record

    Hi Everyone,
    I have been having this problem for 2 weeks and I realize that I spent alot of time I couldn't get to fix the problem so I need your help.
    Here is my situation. First, I installed Oracle 10g in my laptop with Oracle forms10g and Oracle forms904i. I had oracle_home folder as the top level structure then I have inside oracle folder, Oracle10g in it own folder, Oracle9i release2 in it own folder. then I created the user account "student" using the system/manager account finally I granted privilleges as follow:
    GRANT ALL PRIVILLEGES
    TO student
    WITH ADMIN OPTION;
    this was working perfecty I didn't need to grant objects privilleges such as
    GRANT INSERT, UPDATE, DELETE
    ON customers
    TO student;
    Then I created a form Application prototype and it works well I could Insert, Update and Delete but now I am creating an e-commerce application prototype I created an new account using a system/manager account as I did previously and grant all privilleges. When I try to grant object privileges the message that I receive says ORA-01919 : role 'INSERT' doesn't exist
    When I run the application I am unable to insert the record through forms I get message frm-40508 Orcle error: unable to insert record.
    I deinstall the Oracle and clean my laptop and did a clean installation using only Oracle Server10g and Oracle Developer10g I am getting the same message frm-40508.
    Can someone please help me on this. the insert command that I am running is a simple one such as
    INSERT INTO customers
    VALUES( block_name.field_name, ....);
    COMMIT;

    frm 40735:When button pressed trigger raised unhanded exceptionplease help me to solve this>
    The FRM-40735 is a generic Unhandled Exception. Please post the full error message so we can better help you.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Insert Into Vs Insert through a Procedure

    Hi All,
    I want to make a comparison between insertion into a table through normal insert into staement and through a procedure.
    I create a table call test_table with 6 columns and a procedure to insert in that table.
    I opened a session that make normal insert for 32 times and another session that uses the procedure to insert for 39 times. My experience says that insertion through a procedure is faster than normal insert into statement. but when i make trace for both sessions here is the results:
    Session1(Normal Insert)
    INSERT INTO TEST_TABLE
    VALUES(:"SYS_B_0", :"SYS_B_1", :"SYS_B_2", :"SYS_B_3", :"SYS_B_4", :"SYS_B_5")
    call count cpu elapsed disk query current rows
    Parse 32 0.00 0.00 0 0 0 0
    Execute 32 0.01 0.02 0 32 129 32
    Fetch 0 0.00 0.00 0 0 0 0
    total 64 0.01 0.03 0 32 129 32
    Misses in library cache during parse: 1
    Optimizer mode: CHOOSE
    Parsing user id: 125 (CALLCNTR44)
    Rows Execution Plan
    0 INSERT STATEMENT MODE: CHOOSE
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 32 0.00 0.00 0 0 0 0
    Execute 32 0.01 0.02 0 32 129 32
    Fetch 0 0.00 0.00 0 0 0 0
    total 64 0.01 0.03 0 32 129 32
    Misses in library cache during parse: 1
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 0 0.00 0.00 0 0 0 0
    Execute 0 0.00 0.00 0 0 0 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 0 0.00 0.00 0 0 0 0
    Misses in library cache during parse: 0
    32 user SQL statements in session.
    0 internal SQL statements in session.
    32 SQL statements in session.
    1 statement EXPLAINed in this session.
    Trace for Session2(Procedure Insert)
    BEGIN sec1.INSERT_INTO_TEXT_TABLE (); END;
    call count cpu elapsed disk query current rows
    Parse 39 0.04 0.00 0 0 0 0
    Execute 39 0.00 0.00 0 0 0 39
    Fetch 0 0.00 0.00 0 0 0 0
    total 78 0.04 0.01 0 0 0 39
    Misses in library cache during parse: 1
    Optimizer mode: CHOOSE
    Parsing user id: 125 (CALLCNTR44)
    INSERT INTO TEST_TABLE
    VALUES('TEST COL1', 'TEST COL2', 'TEST COL3', 'TEST COL4', 'TEST COL5', 'TEST COL6')
    call count cpu elapsed disk query current rows
    Parse 0 0.00 0.00 0 0 0 0
    Execute 39 0.03 0.00 0 0 80 39
    Fetch 0 0.00 0.00 0 0 0 0
    total 39 0.03 0.00 0 0 80 39
    Misses in library cache during parse: 0
    Optimizer mode: CHOOSE
    Parsing user id: 474 (SEC1) (recursive depth: 1)
    Rows Execution Plan
    0 INSERT STATEMENT MODE: CHOOSE
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 117 0.04 0.02 0 0 0 0
    Execute 117 0.03 0.03 0 0 0 78
    Fetch 39 0.03 0.00 0 312 0 0
    total 273 0.10 0.06 0 312 0 78
    Misses in library cache during parse: 3
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 2 0.00 0.00 0 0 0 0
    Execute 41 0.04 0.01 0 0 80 39
    Fetch 2 0.00 0.00 1 5 0 2
    total 45 0.04 0.02 1 5 80 41
    Misses in library cache during parse: 2
    118 user SQL statements in session.
    2 internal SQL statements in session.
    120 SQL statements in session.
    1 statement EXPLAINed in this session.
    So in session 2 parsing of the procedure it self is still done in each execution but for the statment inside it no and in session1 parsing for the insert is done for every execution. So does this proof my knowledge or it is wrong?
    I see that instead of parsing the insert in session1 there is parsing for the procedure in session2 is that correct?
    Thanks in advance

    Tomy3k_Bakr, you are doing the comparison wrong. Are you running these from sqlplus over and over again? Sqlplus parses every statement you send, this is not the correct way to compare.
    Try this instead.
    YAS@10G>create table t (a number,b number,c number);
    Table created.
    YAS@10G>r
      1  create or replace procedure insert_t(pa number,pb number,pc number) as
      2  begin
      3     insert into t values(pa,pb,pc);
      4* end;
    Procedure created.Run this and see the results.
    exec RUNSTATS_PKG.rs_start;
    begin
    for i in 1..10000 loop
         insert /*+ sql */ into t values(i,i,i);
    end loop;
    end;
    exec RUNSTATS_PKG.rs_middle;
    begin
    for i in 1..10000 loop
         insert_t(i,i,i);
    end loop;
    end;
    exec RUNSTATS_PKG.rs_stop;
    Run1 ran in 124 hsecs
    Run2 ran in 139 hsecs
    run 1 ran in 89.21% of the time
    Name                                  Run1        Run2        Diff
    LATCH.list of block allocation           1           0          -1
    STAT...redo ordering marks              92          91          -1
    STAT...table scans (short tabl           3           2          -1
    LATCH.session idle bit                  27          26          -1
    LATCH.In memory undo latch               0           1           1
    LATCH.file cache latch                   3           2          -1
    LATCH.redo allocation                    8           7          -1
    LATCH.archive process latch              1           0          -1
    LATCH.Consistent RBA                     2           3           1
    LATCH.lgwr LWN SCN                       3           2          -1
    LATCH.mostly latch-free SCN              3           2          -1
    LATCH.KMG MMAN ready and start           1           0          -1
    LATCH.compile environment latc           3           2          -1
    LATCH.session timer                      0           1           1
    LATCH.shared pool                        2           3           1
    STAT...change write time                11          12           1
    STAT...table scan blocks gotte           6           4          -2
    STAT...messages sent                     2           4           2
    STAT...data blocks consistent            3           1          -2
    LATCH.channel operations paren           8           6          -2
    STAT...rollbacks only - consis           3           1          -2
    STAT...cleanout - number of kt          27          31           4
    STAT...index fetch by key                6           2          -4
    STAT...cluster key scans                 6           2          -4
    STAT...active txn count during          27          31           4
    STAT...deferred (CURRENT) bloc           6           2          -4
    STAT...consistent changes               20          24           4
    STAT...consistent gets - exami          39          35          -4
    STAT...session cursor cache hi          11           7          -4
    STAT...CR blocks created                 6           2          -4
    STAT...commit cleanouts succes           6           2          -4
    STAT...commit cleanouts                  6           2          -4
    STAT...workarea memory allocat           5           1          -4
    STAT...calls to kcmgcs                  27          31           4
    STAT...execute count                10,014      10,009          -5
    LATCH.active checkpoint queue            5           0          -5
    STAT...opened cursors cumulati          14           8          -6
    STAT...db block changes             20,324      20,318          -6
    LATCH.redo writing                      14           8          -6
    STAT...parse count (total)              14           8          -6
    STAT...CPU used when call star         131         138           7
    STAT...calls to kcmgas                 101          94          -7
    LATCH.undo global data                  50          43          -7
    STAT...no work - consistent re          15           7          -8
    LATCH.dml lock allocation               12           4          -8
    STAT...DB time                         132         140           8
    STAT...cluster key scan block           12           4          -8
    LATCH.library cache lock                16           8          -8
    STAT...buffer is not pinned co          12           4          -8
    LATCH.messages                          27          17         -10
    STAT...db block gets from cach      10,484      10,473         -11
    STAT...db block gets                10,484      10,473         -11
    STAT...enqueue releases                 24          13         -11
    STAT...enqueue requests                 24          13         -11
    STAT...recursive cpu usage              96         107          11
    STAT...Elapsed Time                    127         140          13
    LATCH.enqueues                          35          22         -13
    STAT...redo entries                 10,181      10,195          14
    STAT...CPU used by this sessio         124         138          14
    LATCH.library cache pin             20,072      20,056         -16
    LATCH.cache buffers lru chain          135         153          18
    STAT...table scan rows gotten           54          36         -18
    STAT...calls to get snapshot s          37          19         -18
    LATCH.library cache                 20,094      20,073         -21
    LATCH.enqueue hash chains               50          26         -24
    STAT...bytes received via SQL*       1,210       1,185         -25
    STAT...consistent gets                  91          63         -28
    STAT...consistent gets from ca          91          63         -28
    STAT...free buffer requested           118         152          34
    STAT...session logical reads        10,575      10,536         -39
    LATCH.row cache objects                153         106         -47
    LATCH.checkpoint queue latch            57           0         -57
    LATCH.SQL memory manager worka          73           6         -67
    LATCH.cache buffer handles              16          84          68
    STAT...recursive calls              10,132      10,053         -79
    LATCH.object queue header oper         334         437         103
    LATCH.cache buffers chains          51,652      51,526        -126
    LATCH.session allocation               258         104        -154
    STAT...free buffer inspected           448         188        -260
    LATCH.simulator lru latch              440         865         425
    LATCH.simulator hash latch             458         892         434
    STAT...hot buffers moved to he       1,222         276        -946
    STAT...undo change vector size     684,064     682,932      -1,132
    STAT...redo size                 2,586,108   2,583,908      -2,200
    Run1 latches total versus runs -- difference and pct
    Run1        Run2        Diff       Pct
    94,017      94,489         472     99.50%For runstats see http://asktom.oracle.com/tkyte/runstats.html.

  • Unable to insert row in object table from plsql block

    I have table called test based on an object type. When I issue an insert statement from sqlplus, the row is inserted. The exact same sql statement in a plsql block gives the error below. Any ideas? (it is not a constraint problem).
    SQL> insert into test values( 3,2,1,1,'asp',1,'mach' );
    1 row created.
    SQL> begin
    2 insert into test values( 3,2,1,1,'asp',1,'mach' );
    3 end;
    4 /
    insert into test values( 3,2,1,1,'asp',1,'mach' );
    ERROR at line 2:
    ORA-06550: line 2, column 16:
    PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-302: component 'DOCUMENT' must be declared
    ORA-06550: line 2, column 4:
    PL/SQL: SQL Statement ignored
    (ddl)
    CREATE OR REPLACE type document as object
    DOC_ID NUMBER (38),
    BATCH_ID NUMBER (38),
    STATE NUMBER (2),
    TRANSIENT NUMBER (2),
    ASP VARCHAR2 (20),
    USER_ID NUMBER (6),
    MACHINE VARCHAR2 (30),
    MEMBER PROCEDURE setState,
    MEMBER function getState RETURN NUMBER
    ) not final;
    create table test of document;

    Hi Adam
    You need to instantiate your object type in your insert statement(while doing through PL/SQL block), so try like this
    Insert into test values(document(1,2,'CO',55,'xyz','kkk','PENTIUM'));
    The reason you were successful through SQLPLUS was that, SQLPLUS automatically instantiate the values into object type.
    Qurashi

  • Unable to insert XML in CLOB (for Long Lived Processes)

    I am trying to insert XML/XDP in a CLOB column of an Oracle Database. It seems to work in a short lived process. However, I get all sorts of errors when I convert it to long lived.
    Anyway one know why?
    I extract the XML/XDP using a process form submission module and convert it to string. Then, I run the insert through a custom script as setString.
    Aditya

    This has been an issue in the past. When I try to change the string size to unlimited, it doesn't allow me to save the process. However, when I create a new string variable and assign it to unlimited, it worked.
    I am thinking, when the string variable is saved the first time with a limit or a lower limit, it saves it to a Varchar2 and it is unable to change to a different column type when a higher char limit or unlimited it set. Don't you think this is a serious issue in existing processes with lower limits on string variables. Do you know a stable work around?
    Also, how can I get value from an XML variable, using a custom script? "patExecContext.getProcessDataValue" doesn't work.
    Aditya

Maybe you are looking for

  • Error while connecting to Access Database

    hi i am making an application using Access Database using the following code *try {* *Connection conn=null;* *Statement s=null;* *ResultSet rs=null;*     *Context ctx=new InitialContext();*      *DataSource ds=(DataSource)ctx.lookup("jdbc/AccessDb");

  • Pass date range parameter  to SQL stored procedure.

    Hi, I'd like to pass a date range parameter from Crystal Reports to a sql stored procedure. Does anyone know if this is possible? I've had no problem passing standard datetime (single value) paramaters to and from but am struggling with getting a ran

  • DOS command

    I want to use the system exec command. I already read one answer that is related to my problem but I´m not fully satisfied. My problem is that I want to use parameters in the command line like: D:\MyFolder>MyApplication file0.fff -i 111.222.333.444 -

  • Sed help pls

    Hi, I have a bounch of files wich are named like "something_sXX_otherthing_YYYY", where sXX can be s01,s02....s99, YYYY is 0001,0002, .... 9999. I'd like to extract the sXX part from the filenames to sort them, can somebody help me how to do in a bas

  • Problems with about home

    I chose Firefox 4 and had some initial concerns with it, but I was about to over come those concerns when about home just started popping up as my home screen an I have not been able to stop it. But worst at the same time that happened my computer st