BLOB to XML Type conversion

Hello All,
I have a blob column on a table that has been used to store xml files. I would like to pull out all these files and load them into a table with an xmltype column.
I have been trying to use dbms_lob to write a function that converts blob to clob wich I can then load into the new table.
I seem to be able to convert the clob ok, but when it goes to parse the xml to load into the table I get "LPX-00210: EXPECTED '<' INSTEAD OF '4' .....
I think this has to do with the characterset not being utf-8. I have tried using raw as well and get the same error.
Has anyone been able to do this that has a function they can share.
Thanks in advance,
Curt

10g provides a new constructor that will work if you know the character set of the BLOB data
FINAL CONSTRUCTOR FUNCTION XMLTYPE RETURNS SELF AS RESULT
Argument Name Type In/Out Default?
XMLDATA BLOB IN
CSID NUMBER IN
SCHEMA VARCHAR2 IN DEFAULT
VALIDATED NUMBER IN DEFAULT
WELLFORMED NUMBER IN DEFAULT
you would do xmltype(BLOB,nls_charset_id(BLOB_CHARSET))

Similar Messages

  • Invalid data type conversions

    what are the invalid data type conversions in ABAP ???
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on Mar 10, 2012 6:01 PM

    No Amanda,
    The values that I see in message monitor are also those that comes to XSLT programs as input.
    I investigated our problem a little further myself:
    1) XI always converts messages into XML format - this everybody knows.
    2) In XI documentation it is declared that XI uses ISO 8601 for DATE type formatting. That's why you see dates in format YYYY-MM-DD in XML data in message monitoring.
    3) The appearance of those decimal values are not that obvious for me. If XI uses ABAP transformation for message content then applies the rules for converting ABAP data types into XML. For this there is a SAP document 'ABAP - XML mapping' from TechEd2004. This document seems to describe how ABAP data types are handled by XML transformation.
    Anyway, we currently need to play with decimal values in XSLT mapping programs inside XI:
    a) add leading 0 integer if source value < 1
    RFC returns 0.123 -> XI converts to XML '.123' -> XSLT mapper should return '0.123' ->SOAP response returns '0.123'
    b) add decimal point and trailing zeros
    RFC returns 0.000 -> XI converts to XML '0' -> XSLT mapper should return '0.000' ->SOAP response return '0.000'
    With dates, the problem is actually on documenting mapping rules when writing interface specifications. If you would write an EAI-solution-independent conversion rule (RFC/date->SOAP/char) for date field it could sound like: YYYYMMDD -> dd.mm.yyyy. This works semantically between these systems but would not work for XI-developer, because he get YYYY-MM-DD from the RFC.
    Additionally the decimal type conversion requirements in XSLT mapping programs probably only applies XI and are therefore not reusable in other EAI environments.
    I would be glad if somebody would still have further comments for this data type conversion issue.
    br: Kimmo

  • IDOCType PORDCR101 : XML IDoc conversion: No known segments identified

    Hello all,
    I'm strugling with the mapping to the IDOC create puchase order PORDCR1.PORDCR101.
    The source structure for the moment is exactly the same as the target strcuture i.e. our IDOC.
    So I would not expect to much problems with this one.
    However, when sending the message we get the following error in SXI_MONITOR:
    <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_RUNTIME</SAP:Code>
      <SAP:P1>XML IDoc conversion: No known segments identified</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error: XML IDoc conversion: No known segments identified</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
    I also augmented the trace lvl to 3 and got the following in the Trace-part of TC SXI_MONITOR and
    suspect it starts to get wrong already in the beginning
    - <!--  ************************************
      -->
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="T">---- Outbound IDoc-Adapter -
    </Trace>
      <Trace level="1" type="T">----
    </Trace>
    Trace level="1" type="T">Convert one IDoc</Trace> .
      <Trace level="2" type="T">Convert Control Record</Trace>
      <Trace level="2" type="T">Convert Data Records</Trace>
      <Trace level="3" type="T">Segment= E1BPMEPOHEADER</Trace>
      <Trace level="2" type="T">Ignore unknown Segment E1BPMEPOHEADER</Trace>
      <Trace level="2" type="T">Ignore segment field: COMP_CODE</Trace>
      <Trace level="3" type="T">Segment= E1BPMEPOHEADERX</Trace>
      <Trace level="2" type="T">Ignore unknown Segment E1BPMEPOHEADERX</Trace>
      <Trace level="3" type="T">Segment= E1BPMEPOADDRVENDOR</Trace>
      <Trace level="2" type="T">Ignore unknown Segment E1BPMEPOADDRVENDOR
    I already found the four or so other threads on the SDN website about this error and in the mean-time tried them (delete and reload the structure with IDX2, set the begin and segment-attribute to 1, make sure that the segments-names self are also mappend) but to no avail.
    We just implemented two other IDOC's (DELVRY03 and WMMBID02) and they arrive at SAP without problmens.
    Hope you have form ideas to get me out of this one.
    Tnx and best regards.
    Bart.

    Hi Bart,
    We had a similar problem.... It took us 2 days to find out what the problem was... Nothing on SDN was helpfull so far... First we incremented the trace level of XI to see the debug messages... Then we saw that certain segments could not be identified and are ignored, others not...
    So further investigation in IDX2 to the specific IDoc with problems showed us a list with all used segments and their versions. Some segments had only 1, others had more versions....
    So we could identify the problem as a segment version problem. It seemed that our IDoc Communication Channel took not the most recent version. So we changed the "Segment Version" to the most recent one and the problem was solved!
    Please reward points if this was usefull to you...
    cheers!
    Pedro

  • Passing regexp_replace backreference to a function; type conversion problem

    I am trying to convert some text within my CLOB field to HTML links.
    The format of the (part of the link I am having problems with) is:
    <link 12>
    which I wish to convert to
    url_dest
    I am trying to pass the backreference \1 (being the number 12 in this case) in regexp_replace to a simple function I have made and when I run it I receive the error:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    I have tested the function on its own with passing a string and it works fine.
    I have passed the string from the backreference to the function and back out as the return value and it works fine.
    However, when I try to pass the string back reference (a set of digits) to use as the NUMBER ID in my where clause, it always returns this error. I have tried CASTing / TO_NUMBER in every way possible I can think of, using temporary variables etc. and still the same error.
    =====
    CREATE OR REPLACE
    FUNCTION GETLINK (linkid IN CLOB)
    RETURN VARCHAR2 AS
    linkstring VARCHAR2(4000);
    linkchar VARCHAR(4000);
    linkint NUMBER;
    BEGIN
    linkchar := TO_CHAR(linkid);
    linkint := TO_NUMBER(linkchar);
    SELECT url_dest INTO linkstring FROM TABLE WHERE ID = linkint;
    RETURN linkstring;
    END;
    =====
    Offending calling code:
    tempcontent := regexp_replace(myClobField, '<link ([[:digit:]]*)>', GETLINK('\1'));
    =====
    I have tried implicit and explicit type conversions that vary the above function; in parameters as VARCHAR2; etc.; no joy.
    Is this a bug within the database, is it by design, or is it just me making a hash of things? I really don't want to have to pull the XML into PHP then run the PHP regex functions with Oracle DB queries to do this!
    Many thanks for your assistance.
    Ingram

    Many thanks for the reply, but I'm not sure how that would work. I wish to do a global regexp_replace on all instances of '<link> ([[:digit:]]*)>' within my XML document, with the return value from the GETLINK function.
    So for instance.
    The return value of GETLINK could be in format:
    &lt;a href="\1"&gt;
    so an XML document of:
    =====
    &lt;doc&gt;
    &lt;link 12&gt;Test Link&lt;/link&gt;
    some content
    &lt;link 783&gt;A second Test Link&lt;/link&gt;
    &lt;/doc&gt;
    =====
    would return as:
    =====
    &lt;doc>
    &lt;a href="12"&gt;Test Link&lt;/link&gt;
    some content
    &lt;a href="783"&gt;A second Test Link&lt;/link&gt;
    &lt;/doc&gt;
    =====
    Obviously I would then do the other replacements to fix broken XML with the non matching end tags etc.
    TIA

  • ORACLE8I - LONG TYPE을 LOB TYPE으로 CONVERSION하는 방법(TO_LOB)

    제품 : ORACLE SERVER
    작성날짜 : 2002-04-12
    ORACLE8I - LONG TYPE을 LOB TYPE으로 CONVERSION하는 방법(TO_LOB)
    ===============================================================
    Purpose
    Long type의 data를 lob type으로 conversion하는 to_lob function에 대해
    알아보자.
    Explanation
    Oracle8 부터 long 이나 long raw type과는 별도로 lob type이 추가되었다.
    long 이나 long raw type을 clob 또는 blob type으로 변경하기 위해서는
    Oracle8 에서는 데이타를 다시 입력해야 했지만, Oracle8i 에서는 추가된
    TO_LOB function을 이용하여 간단히 data migration을 할 수 있다.
    TO_LOB function은 보통 create table .. as select .. 문장이나
    insert into .. select .. 문장에서 쉽게 사용할 수 있다.
    Example
    [예제1] long type의 데이타를 clob type으로 옮기는 방법
    아래의 예제에서 type만 long raw와 blob 로 바꾸어도 가능하다.
    SQL> create table long_data (c1 number, c2 long);
    Table created.
    SQL> desc long_data
    Name Null? Type
    C1 NUMBER
    C2 LONG
    SQL> insert into long_data values
    2 (1, 'This is some long data to be migrated to a CLOB');
    1 row created.
    SQL> create table test_lobs
    2 (c1 number, c2 clob);
    Table created.
    SQL> desc test_lobs
    Name Null? Type
    C1 NUMBER
    C2 CLOB
    SQL> insert into test_lobs
    2 select c1, to_lob(c2) from long_data;
    1 row created.
    SQL> select c2 from test_lobs;
    C2
    This is some long data to be migrated to a CLOB
    [예제2] long type을 clob type으로 바꾸어 table 생성하는 방법
    SQL> create table clob_data
    2 as select c1, to_lob(c2) c2 from long_data;
    Table created.
    SQL> desc clob_data
    Name Null? Type
    C1 NUMBER
    C2 CLOB
    [예제3] long raw type을 blob type으로 바꾸어 table 생성하는 방법
    SQL> desc image_data
    Name Null? Type
    C1 NUMBER
    C2 LONG RAW
    SQL> create table blob_data
    2 as select c1, to_lob(c2) c2 from image_data;
    Table created.
    SQL> desc blob_data
    Name Null? Type
    C1 NUMBER
    C2 BLOB

    You may not insert LONGs into a table that are selected from a remote database. You can simply SELECT LONGs across a DB link, but you just can't INSERT... SELECT them.
    Greg Pike
    http://www.singlequery.com

  • Times Ten and PL/SQL XML Type

    How TT can support XML type PL/SQL or what is workaround...

    Gennady Sigalaev wrote:
    PL/SQL in TimesTen does not support large objects (LOBs), Internet data types (XMLType, URIType, HttpURIType), or "Any" data types (AnyType, AnyData, AnyDataSet).
    More information you can find in documentation (http://download.oracle.com/docs/cd/E13085_01/welcome.html)
    From Oracle's website: http://www.oracle.com/technetwork/database/timesten/documentation/1121-historic-183693.html
    "You can cache Oracle LOB data in TimesTen cache groups. Oracle CLOB data is cached as TimesTen VARCHAR2 data. Oracle BLOB data is cached as TimesTen VARBINARY data. Oracle NCLOB data is cached as TimesTen NVARCHAR2 data."
    However, the catch is the VARCHAR2 and VARBINARY in TT would appear to only handle 4 MB and Oracle CLOB and BLOB handles 4 GB. So it does support it but up to a certain point it would seem.
    Edited by: victor on Aug 24, 2011 12:36 PM

  • Reporting Services web service complex xml type report parameters

    Hi,
    I have the following xml type parameter in my request query that I use in reporting services.
    <Parameter Name="accountDetails" Type="XML" xmlns:d4p1="thevalue" xmlns:i="thevalue">
    <DefaultValue>
    <d4p1:AccountDetailDto>
    <d4p1:AccountNumber>12345</d4p1:AccountNumber>
    <d4p1:AccountType>Sales</d4p1:AccountType>
    </d4p1:AccountDetailDto>
    </DefaultValue>
    I want to know how I can assign values to the accountDetails parameter from report parameters, I've tried to call it from the dataset parameter properties but it doesn't return any values. I created Parameters!accountDetails.Value on the dataset parameters
    properties and assigned it the following value: it only returns empty columns
    ="<AccountDetailDto><AccountNumber>"& Parameters!AccountNumber.Value &"</AccountNumber><AccountType>"& Parameters!AccountType.Value &"</AccountType></AccountDetailDto>"
    You're help will be highly appreciated as I've been trying to solve this for a while now

    Hi Alisa,
    Perhaps I should explain my problem clearly...
    This is my query request that I send to the webservice:
    <Query>
    <Method Name="GetPerAccountAssetAllocation" Namespace="http://tempuri.org/">
    <Parameters>
    <Parameter Name="accountDetails" Type="XML" xmlns:d4p1="thevalue" xmlns:i="thevalue">
    <DefaultValue>
    <d4p1:AccountDetailDto>
    <d4p1:AccountNumber>12345</d4p1:AccountNumber>
    <d4p1:AccountType>JSE</d4p1:AccountType>
    </d4p1:AccountDetailDto>
    </DefaultValue>
    </Parameter>
    </Parameters>
    </Method>
    <SoapAction>http://tempuri.org/IPortfolioManagementService/GetPerAccountAssetAllocation</SoapAction>
    <ElementPath IgnoreNamespaces="true">*</ElementPath>
    </Query>
    It works well when I run it just like this, that is without specifying any parameters in the report data dialogue window or on the dataset parameters properties, it returns the values and columns correctly.
    So my problem is, I need to find out how(xml parameter syntax, steps e.t.c)
    I can do to allow users to specify the accountDetails parameter, its quite tricky for me coz its an xml type parameter, Im not sure if I should just specify the AccountNumber and
    ReportType parameters separately:
    I've tried the following without any success:
    1. Under the dataset properties:  I tried not to specify a default value for the accountDetails parameter on the xml query, then I added a parameter called "accountDetails" under the dataset parameters properties, then under parameter
    value I added the following xml value :
    <d4p1:AccountDetailDto>
    <d4p1:AccountNumber>Parameters!AccountNumber.Value</d4p1:AccountNumber>
    <d4p1:AccountType>Parameters!AccountType.Value</d4p1:AccountType>
    </d4p1:AccountDetailDto> 
    (I also added the AccountNumber and AccountType parameters under the report data dialogue window)
    This returns empty columns, is there something I'm missing, or am I doing this incorrectly?

  • Implicit and explicit Type conversion using Type object in heap

    Hi,
    I am surprised how Implicit and explicit Type conversion works using Type object in heap. for example when implicit type conversion occur what pointer it returns to object and similarly with explicit type conversion.

    Hello,
    >> I am surprised how Implicit and explicit Type conversion works using Type object in heap.
    For Implicit conversions: Typical examples are conversions from smaller to larger integral types, and conversions from derived classes to base classes. For the first one, the reference would be different which means it would return a different pointer to
    a new object. For the reference type, it actually points to the same memory location, you could use the object.ReferenceEquals() to check it.
    For Explicit conversions (casts):Typical examples include numeric conversion to a type that has less precision or a smaller range, and conversion of a base-class instance to a derived class. For first one, it would perform the same with implicit conversions.
    While for the conversion of conversion of a base-class instance to a derived class, actually, there's no built-in way to do this conversion.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Custom action with XML type input and output parameter.

    Hi,
    I want to develop custom action with xml type input and/or output parameter.
    Is there sample code for java side. How is the definition of input and/or output parameter and set/get methods?
    does it need special .jar file to develop custom action like this?
    Thanks.

    Cemil - yes, you can use XML data types.  Use the class
    com.sap.lhcommon.xml.XMLDataType
    for your parameter type.  Here is a snippet from a custom action we use to log XML (instead of just returning the #text node like the default logger does):
    public class XMLLogger extends ActionReflectionBase
        private String source;
        private String eventType;
        private String textMessage;
        private XMLDataType xmlMessage;
        public XMLLogger()
            log = new Logger("UserLog");
            source = DEFAULT_SOURCE;
            eventType = TYPE_INFO;
            textMessage = "";
            xmlMessage = new XMLDataType();
        public XMLDataType getXmlMessage()
            return xmlMessage;
        public void setXmlMessage(XMLDataType xmlMessage)
            this.xmlMessage = xmlMessage;
        public void Invoke(Transaction transaction, ILog ilog)
            StringBuffer sb = new StringBuffer();
            sb.append('[');
            sb.append(source);
            sb.append("] ");
            sb.append(textMessage);
            sb.append(XMLUtils.convertXmlToString(xmlMessage));
    XMLUtils is a helper class we wrote - it's just a bunch of standard Java XML boilerplate code.  The important part you need to know is XMLDataType.getDocument() will return an org.w3c.dom.Document.
    I hope that was enough information to help.
    -tim

  • Store the value  in BLOB column data type

    Hi All,
    I have a file of about 5MB. I want to store this in BLOB column data type of a table.
    Can we compress this file to store and when we take uncompress the same...or how do we do it.
    and what is the procedure to store this....
    pls. help me
    Thanks,
    Naresh

    Hi skud
    i juast want to store the agent code to variable.if i did get ur point...
    Why don't u just use a simple assign statment for example...
    DECLARE
    V_VALUE  NUMBER;
    BEGIN
    V_VALUE := LC354 ; -- IF it was a value as LC354 static i mean
    -- or u could use any value
    V_VALUE := :ur_form_item_name; --- if it was dynamic
    END;That's it .
    Hope this helps...
    Regards,
    Ammatu Allah.

  • (updating xml value)adding an element in an xml type column

    Hi all,
    i hava a table that contains an xml-Type column (non schema based)
    i have inserted some data in it
    table:(id,xmlcolumn)
    ex:
    insert into t1 values(1,'<Chapters>
    <Chapter>ch1<Chapter>
    <Chapter>ch2<Chapter>
    </Chapters>')
    i need to add a new Chapter: <Chapter>ch3</Chapter>
    for the result of xml instance in the table to be:
    <Chapters>
    <Chapter>ch1<Chapter>
    <Chapter>ch2<Chapter>
    <Chapter>ch3<Chapter>
    </Chapters>
    plz if any one colud help

    SQL> DECLARE
      2      l_xml      XMLTYPE := XMLTYPE('<Chapters>
      3  <Chapter>ch1</Chapter>
      4  <Chapter>ch2</Chapter>
      5  </Chapters>');
      6      l_xsl      XMLTYPE;
      7      l_new_node VARCHAR2(100) := '<Chapter>ch3</Chapter>';
      8  BEGIN
      9      dbms_output.put_line('Before adding node:');
    10      dbms_output.put_line('----------------------------------------------------------------');
    11      dbms_output.put_line(l_xml.getStringVal());
    12      dbms_output.put_line('----------------------------------------------------------------');
    13      l_xsl := XMLTYPE('<?xml version="1.0"?>' ||
    14                       '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"' ||
    15                       ' version="1.0"' || ' result-ns=""' || ' indent="no">' ||
    16                       '<xsl:output method="xml" media-type="text/xml" indent="no"/>' ||
    17                       '<xsl:template match="/">' ||
    18                           '<' ||l_xml.getRootElement() || '>' ||
    19                               ' <xsl:for-each select="/' || l_xml.getRootElement() ||'/Chapter">' ||
    20                                   '<xsl:copy-of select="." />' ||
    21                               '</xsl:for-each>' ||
    22                               l_new_node ||
    23                           '</' || l_xml.getRootElement() || '>' ||
    24                       '</xsl:template>' ||
    25                       '</xsl:stylesheet>');
    26      l_xml := l_xml.Transform(l_xsl);
    27      dbms_output.put_line('After adding node:');
    28      dbms_output.put_line('----------------------------------------------------------------');
    29      dbms_output.put_line(l_xml.getStringVal());
    30      dbms_output.put_line('----------------------------------------------------------------');
    31  END;
    32  /
    Before adding node:
    <Chapters>
    <Chapter>ch1</Chapter>
    <Chapter>ch2</Chapter>
    </Chapters>
    After adding node:
    <Chapters>
      <Chapter>ch1</Chapter>
      <Chapter>ch2</Chapter>
      <Chapter>ch3</Chapter>
    </Chapters>
    PL/SQL procedure successfully completed.
    SQL>

  • ORA-19007 when coping a table with an xml type in it to a new schema in the

    ORA-19007 when coping a table with an xml type in it to a new schema in the same database.
    Hi all,
    When I copy a table with an xml type in it to a new schema in the same database I get an ora-19009.
    The setup is as follows I have a schema a with table TABLE_WITH_XMLTYPE where data is:
    CREATE
    TABLE TABLE_WITH_XMLTYPE
    FOLDER_ID NUMBER (10, 0) NOT NULL,
    SEARCH_PROPERTIES XMLTYPE ,
    CONSTRAINT TABLE_WITH_XMLTYPE PK PRIMARY KEY (FOLDERID) USING INDEX
    XMLTYPE COLUMN SEARCH_PROPERTIES XMLSCHEMA
    "http://xxxxxxx.net/FolderProperties.xsd" element "FolderProperties"
    VARRAY SEARCH_PROPERTIES."XMLDATA"."PROPERTIES"."PROPERTY" STORE AS TABLE
    PROPERTY_TABLE
    (PRIMARY KEY (NESTED_TABLE_ID, ARRAY_INDEX)) ORGANIZATION INDEX OVERFLOW
    Both schemas have the following xml schema registered as a local xml schema
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL => 'http://xxxxxxx.net/FolderProperties.xsd',
    SCHEMADOC =>
    '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb"
    xdb:storeVarrayAsTable="true">
    <xs:element name="FolderProperties"
    type="FolderPropertiesType"
    xdb:defaultTable="FOLDER_SEARCH_PROPERTIES" />
    <xs:complexType name="FolderPropertiesType" xdb:SQLType="FOLDERPROPERTIES_T">
    <xs:sequence>
    <xs:element name="FolderID" type="FolderIDType" minOccurs="1" xdb:SQLName="FOLDER_ID"/>
    <xs:element name="Properties" type="PropertiesType" xdb:SQLName="PROPERTIES"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="PropertiesType" xdb:SQLType="PROPERTIES_T">
    <xs:sequence>
    <xs:element name="Property" type="PropertyType" maxOccurs="unbounded"
    xdb:SQLName="PROPERTY" xdb:SQLCollType="PROPERTY_V"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="PropertyType" xdb:SQLType="PROPERTY_T">
    <xs:sequence>
    <xs:element name="DateValue" type="DateType" xdb:SQLName="DATE_VALUE"/>
    <xs:element name="NumValue" type="NumType" xdb:SQLName="NUM_VALUE"/>
    <xs:element name="StringValue" type="StringType" xdb:SQLName="STRING_VALUE"/>
    </xs:sequence>
    <xs:attribute name="Name" xdb:SQLName="NAME" xdb:SQLType="VARCHAR2">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="255"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    </xs:complexType>
    <xs:simpleType name="FolderIDType">
    <xs:restriction base="xs:integer"/>
    </xs:simpleType>
    <xs:simpleType name="DateType">
    <xs:restriction base="xs:dateTime"/>
    </xs:simpleType>
    <xs:simpleType name="NumType">
    <xs:restriction base="xs:decimal"/>
    </xs:simpleType>
    <xs:simpleType name="StringType">
    <xs:restriction base="xs:string" />
    </xs:simpleType>
    </xs:schema>',
    LOCAL => TRUE,
    GENTYPES => TRUE,
    GENTABLES => FALSE);
    END;
    when I try to do the following insert:
    insert into schemaB.TABLE_WITH_XMLTYPE ( FOLDER_ID, SEARCH_PROPERTIES)
    select FOLDER_ID, SEARCH_PROPERTIES from schemaB.TABLE_WITH_XMLTYPE;
    I’ll get an ora-19007.
    Can some one point me in the right direction how to solve this error.
    Thanks Roelof.

    Who did you create the second table, in other words, how did you COPY the table as you said...
    If you created the second table via a CTAS (create table as select) then you will have created a table that is not the same as the original one. AFAIK I have once created an enhancement request for this after discovering that JDeveloper, for example, creates a "copy" via a CTAS which creates the wrong structure. Double check via package DBMS_METADATA.
    SQL> set long 1000000
    SQL> select DBMS_METADATA('TABLE','TABLE_WITH_XMLTYPE','SchemaA') from dual;
    SQL> select DBMS_METADATA('TABLE','TABLE_WITH_XMLTYPE','SchemaB') from dual;If you have got two different tables, than Mark's solution should help.
    M.
    Edited by: Marco Gralike on Feb 15, 2009 11:16 AM

  • The priority of different data type conversion

    Hi All,
    I want to know the priority of data type conversion rule. if in an expression, I have several kind of data type( I, P, F,N..).
    Then finaly, all the data object will convert to which data type?
    I don't know the priority of data conversion.
    E.g.   data a type i. data b type p. data c type f.
             a = b + c.
    or    data d type p, data e type f.
          if ( d > f ).
    Then who will convert to who's type?
    Thanks and Regards.
    Aaron

    For expressions, the right term in SAP is "calculation type", it's explained here : [abap help - determining the calculation type|http://help.sap.com/abapdocu_70/en/ABENARITH_TYPE.htm]. SAP takes the "biggest" type of all variables in the expression. It can be I, P or F (smallest is I, biggest is F).
    Conditions are handled differently, just using data type conversion (see link given above by Abhishek), SAP converts from smallest to biggest type (in your case, it converts P to F and compares the two F variables).

  • Need Help with data type conversion

    Hello People,
    I am new to java, i need some help with data type conversion:
    I have variable(string) storing IP Address
    IPAddr="10.10.103.10"
    I have to call a library function which passes IP Address and does something and returns me a value.
    The problem I have is that external function call in this library excepts IP Address in form of a byte array.
    Here is the syntax for the function I am calling through my program
    int createDevice (byte[] ipAddress).
    now my problem is I don't know how to convert the string  IPAddr variable into a byte[] ipAddress to pass it through method.

    Class InetAddress has a method
    byte[]      getAddress() You can create an instance using the static method getByName() providing the IP address string as argument.

  • Help  needed  in inserting  into column  of XML type

    i have requirement of inserting data into column of xml type
    eg
    cust product cost
    1 a 3
    1 b 7
    1 c 5
    now required result should
    <PROD-LIST>
    <a>3</a>
    <b>7</b>
    <c>5</c>
    </PROD-LIST>
    Please let me know how to achieve this , i was trying write function , it was working for one values ,but how to do if many values exist .

    Take a deep breath, then retype this putting in all the words and punctuation you missed out the first time until it makes sense.
    Your sample data, for example, could be better formatted using the [pre] and [/pre] tags to preserve formatting and put in a table format. Similarly with your output. Why are two of the numbers floating around freely in your xml but the 3rd isn't?

Maybe you are looking for

  • Integrated Document Management System

    Hi, We are considering Oracle IFS as part of an Integrated Document Management system with the following functionality: 1. Document/Image Capture 2. Document Storage & Retrieval 3. Processflow/Workflow IFS meets the requirement for the point 2 above.

  • IDOC for outbound delivery

    Hi All, I need to generate an outbound IDOC when DO is created in VL01N. I searched in SDN and it returns me a lot of different results that really confusing. I found some using IDOC_OUTPUT_DESADV01, some using IDOC_OUTPUT_DELVRY. I do look into the

  • Can't start reports server on win2000

    I'm having a trouble with starting reports server service on win2000 advanced server. I'm getting this message from Event viewer: The Oracle Reports Server [Rep60_HAL-OraHome6i] service terminated with service-specific error 186. And I can't find any

  • Upload / Attach File in form

    I'm new to the LiveCycle Designer, so please bare with me. I need to design a form that will allow a user to link/attach files. When the user submits the form we would like the form to link to the documents like a hyperlink. Please help the newbie.

  • Software installation date

    Looking for a way to audit the installation date of all software and plugins on a Mac Pro.