ORA-00932 Using Structured XML Table

Hello,
I'm having a problem in trying to create and use a Structured XML Table.
I have created very small sample that illustrates my problem:
I have registered the following schema:
<schema
targetNamespace="http://tsldev01.thesoftlife.com:7887/SoftTop/Schemas/Jjm.xsd"
xmlns:jjm="http://tsldev01.thesoftlife.com:7887/SoftTop/Schemas/Jjm.xsd" xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<complexType name="JjmType">
<choice maxOccurs="unbounded">
<element name = "Key" type = "string"></element>
<element name = "Type" type = "string"></element>
<element name = "AccessID" type = "string"></element>
</choice>
</complexType>
<element name ="Jjm" type="jjm:JjmType"/>
</schema>'
Then I created the following table:
CREATE TABLE JJM_SCHEMA of XMLType
XMLSCHEMA "http://tsldev01.thesoftlife.com:7887/SoftTop/Schemas/Jjm.xsd"
ELEMENT "Jjm";
Then I inserted the following row:
insert into JJM_SCHEMA values(xmltype('<Jjm
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xsi:noNamespaceSchemaLocation="http://tsldev01.thesoftlife.com:7887/SoftTop/Schemas/Jjm.xsd">
<Key>anp</Key>
               <Type>User</Type>
<AccessID>TSL2</AccessID>
</Jjm>'));
Then I do the following query:
SELECT
extract(value(x),
'/Jjm[Type="User"]') AS jjmXML FROM JJM_SCHEMA x
WHERE existsNode(value(x),'/Jjm[Type="User"]') = 1;
I get this error:
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected UDT got CHAR
However, if I remove the Xpath predicate [Type="User"] from the "extract()" function and WHERE clause...
SELECT
extract(value(x),
'/Jjm') AS jjmXML FROM JJM_SCHEMA x
WHERE existsNode(value(x),'/Jjm') = 1;
The query works.
Also, If I change the schema from <choice maxOccurs="unbounded"> to <sequence>... either query works.
I need the "choice" type element to work with the Xpath predicate. Am I missing something?
Thanks in advance.
Jim McDowall

Jim
Which version of the database are you using...
Testing with 9.2.0.4.0 I had to add an xmlns declaration to the instance document before I could insert it into the table
<Jjm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tsldev01.thesoftlife.com:7887/SoftTop/Schemas/Jjm.xsd" xsi:noNamespaceSchemaLocation="http://tsldev01.thesoftlife.com:7887/SoftTop/Schemas/Jjm.xsd">
     <Key>anp</Key>
     <Type>User</Type>
     <AccessID>TSL2</AccessID>
</Jjm>
However once that was done I get the following.
SQL*Plus: Release 9.2.0.4.0 - Production on Wed Aug 20 15:40:32 2003
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> spool testcase.log
SQL> set trimspool on
SQL> connect &1/&2
Connected.
SQL> --
SQL> set timing on
SQL> set long 10000
SQL> set pages 10000
SQL> set feedback on
SQL> set lines 132
SQL> --
SQL> SELECT extract(value(x),'/Jjm[Type="User"]') AS jjmXML
2 FROM JJM_SCHEMA x
3 WHERE existsNode(value(x),'/Jjm[Type="User"]') = 1
4 /
JJMXML
<Jjm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tsldev01.thesoftlife.com:7887/SoftTop/S
noNamespaceSchemaLocation="http://tsldev01.thesoftlife.com:7887/SoftTop/Schemas/Jjm.xsd">
<Key>anp</Key>
<Type>User</Type>
<AccessID>TSL2</AccessID>
</Jjm>
1 row selected.
Elapsed: 00:00:02.07
SQL> SELECT extract(value(x),'/Jjm') AS jjmXML
2 FROM JJM_SCHEMA x
3 WHERE existsNode(value(x),'/Jjm') = 1;
JJMXML
<Jjm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tsldev01.thesoftlife.com:7887/SoftTop/S
noNamespaceSchemaLocation="http://tsldev01.thesoftlife.com:7887/SoftTop/Schemas/Jjm.xsd">
<Key>anp</Key>
<Type>User</Type>
<AccessID>TSL2</AccessID>
</Jjm>
1 row selected.
Elapsed: 00:00:00.00
SQL> /
JJMXML
<Jjm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tsldev01.thesoftlife.com:7887/SoftTop/S
noNamespaceSchemaLocation="http://tsldev01.thesoftlife.com:7887/SoftTop/Schemas/Jjm.xsd">
<Key>anp</Key>
<Type>User</Type>
<AccessID>TSL2</AccessID>
</Jjm>
1 row selected.
Elapsed: 00:00:00.00
SQL> quit

Similar Messages

  • Getting ORA-00932 with any object table

    Hi, I'm new to Oracle and it's enormous community so I apologize in advance for posting
    in the wrong place or for giving not enough information.
    As I just said, I'm new to Oracle therefore I'm following the [introductory guide|http://www.mcs.csueastbay.edu/support/oracle/doc/10.2/appdev.102/b14260/adobjint.htm#sthref102] and trying the examples it gives one-by-one.
    I used to use MySql in the past but now I need to use a more stable and scalable database that allows
    the storage of objects.
    I'm using Oracle 10.g XE on a GNU/Linux computer (Ubuntu 8.10)
    Let's start with the question:
    in the Example 1-6 the following code is given:
    CREATE TYPE emp_person_typ AS OBJECT (
      name     VARCHAR2(30),
      manager  REF emp_person_typ );
    Type created.
    CREATE TABLE emp_person_obj_table OF emp_person_typ;
    Table created.
    INSERT INTO emp_person_obj_table
      SELECT emp_person_typ ('Bob Jones', REF(e))
        FROM emp_person_obj_table e
        WHERE e.name = 'John Smith';
    1 row(s) inserted.Executing these queries return successfull messages.
    But when I try to retrieve the records by using this query:
    select * from emp_person_obj_table;or when accessing the "Data" tab of that table in the Object Browser"
    I get this error:
    (error report:)
    ORA-00932: inconsistent datatypes: expected NUMBER got REF RESMAN.EMP_PERSON_TYPAll queries are executed in the Application Express (2.1.0.00.39) query runner.
    I think I did everything in the right manner, although the code is just copy-pasted from the guide, so I can't realize
    why this annoying error is still appearing when accessing that table.
    I noticed that executing the same selection query as above in the SQL*Plus CLI works as expected
    and returns a resultset.
    Thanks in advance for any reply.

    Since the query works in SQL*Plus, I would tend to assume that this is a limitation of the APEX query runner. If you post over in the APEX forum, someone may be able to confirm that or suggest a way of working around it.
    Do you need to use the APEX query runner? Could you use SQL*Plus or SQL Developer instead?
    Justin

  • ORA-00939 when creating XML table with Virtual Columns

    Getting error on creating table with VIRTUAL COLUMNS:
    Error at Command Line:4 Column:31
    Error report:
    SQL Error: ORA-00939: too many arguments for function
    00939. 00000 - "too many arguments for function"
    Without VIRTUAL COLUMNS works fine.
    Where to start?
    Is it possible to add Virtual Columns after a table is created?
    CREATE TABLE TDS_XML OF XMLType
    XMLSCHEMA "http://xmlns.abc.com/tds/TDSSchemaGen2.xsd"
    ELEMENT "TDSTestData"
      VIRTUAL COLUMNS
      TESTID AS (
        XMLCast(
                  XMLQuery('declare default element namespace "http://xmlns.abc.com/tds/TDSSchemaGen2.xsd"; /TDSTestData/TestID' PASSING OBJECT_VALUE RETURNING CONTENT)  AS VARCHAR2(32)
       )SQL*Plus: Release 11.2.0.2.0 Production on Mon Apr 30 20:17:29 2012
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for 64-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    SQL>

    victor_shostak wrote:
    Figured, Virtual Columns work only for Binary XML.They are only supported, currently, for Binary XML.

  • 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

  • Generate xml using FOR XML PATH from table with hierarchy

    I need to create xml from a table like:
    EL1 EL2 EL3 Attr01 Attr02 Attr03 Attr04
    E10,    ,    ,a,b,c,d
    E10,E1010,    ,a,b,c,d
    E10,E1010,E101010,a,b,c,d
    E10,E1010,E101020,a,b,c,d
    E10,E1010,E101030,a,b,c,d
    E10,E1020,    ,a,b,c,d
    E10,E1020,E102010,a,b,c,d
    E20,    ,    ,a,b,c,d
    E20,E2010,    ,a,b,c,d
    E20,E2010,E201010,a,b,c,d
    E20,E2020,    ,a,b,c,d
    E20,E2020,E202010,a,b,c,d
    E20,E2020,E202020,a,b,c,d
    The hierarchy is EL1--EL2--EL3, and the 3 columns should be elements of xml;
    The other for columns Attr01,Attr02,Attr03,Attr04 should be attributes of xml;
    The actual table could have more than 500 rows(there are many values for El1,EL2,and EL3). 
    The expected xml should like:
    <root>
      <E10 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
        <E1010 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
          <E101010 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
          <E101020 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
          <E101030 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
        </E1010>
        <E1020 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
          <E102010 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
        </E1020>
      </E10>
      <E20 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
        <E2010 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
          <E201010 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
        </E2010>
        <E2020 Attr01="a" Attr02="b" Attr03="c" Attr04="d">
          <E202010 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
          <E202020 Attr01="a" Attr02="b" Attr03="c" Attr04="d" />
        </E2020>
      </E20>
    </root>
    I create a sample Src table:
    CREATE TABLE Src
    EL1 VARCHAR(10),
    EL2 VARCHAR(10),
    EL3 VARCHAR(10),
    Attr01 VARCHAR(10),
    Attr02 VARCHAR(10),
    Attr03 VARCHAR(10),
    Attr04 VARCHAR(10)
    GO
    INSERT INTO Src
    (EL1,EL2,EL3,Attr01,Attr02,Attr03,Attr04
     SELECT 'E10','','','a','b','c','d'
     UNION SELECT 'E10','E1010','','a','b','c','d'
     UNION SELECT 'E10','E1010','E101010','a','b','c','d'
     UNION SELECT 'E10','E1010','E101020','a','b','c','d'
     UNION SELECT 'E10','E1010','E101030','a','b','c','d'
     UNION SELECT 'E10','E1020','','a','b','c','d'
     UNION SELECT 'E10','E1020','E102010','a','b','c','d'
     UNION SELECT 'E20','','','a','b','c','d'
     UNION SELECT 'E20','E2010','','a','b','c','d'
     UNION SELECT 'E20','E2010','E201010','a','b','c','d'
     UNION SELECT 'E20','E2020','','a','b','c','d'
     UNION SELECT 'E20','E2020','E202010','a','b','c','d'
     UNION SELECT 'E20','E2020','E202020','a','b','c','d'
    GO
    I tried to use FOR XML PATH to generate xml for the sample data. When the records increase to a few hundreds, it's not a good idea.
    Here is my script:
    SELECT
    (SELECT Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E101010'
    FOR XML PATH('E101010'),TYPE
    ) AS 'node()'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E101020'
    FOR XML PATH('E101020'),TYPE
    ) AS 'node()'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E101030'
    FOR XML PATH('E101030'),TYPE
    ) AS 'node()'
    FROM Src
    WHERE EL2 = 'E1010' AND (EL1 <>'' AND EL3 ='')
    FOR XML PATH('E1010'),TYPE
    ) AS 'node()'--1010
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E102010'
    FOR XML PATH('E102010'),TYPE
    ) AS 'node()'
    FROM Src
    WHERE EL2 = 'E1020' AND (EL1 <>'' AND EL3 ='')
    FOR XML PATH('E1020'),TYPE
    ) AS 'node()'--1020
    FROM Src
    WHERE EL1 = 'E10' AND (EL2 ='' AND EL3 ='')
    FOR XML PATH('E10'),TYPE) 'node()'
    ,(SELECT Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E201010'
    FOR XML PATH('E201010'),TYPE
    ) AS 'node()'
    FROM Src
    WHERE EL2 = 'E2010' AND (EL1 <>'' AND EL3 ='')
    FOR XML PATH('E2010'),TYPE
    ) AS 'node()'--2010
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E202010'
    FOR XML PATH('E202010'),TYPE
    ) AS 'node()'
    ,( SELECT
    Attr01 AS '@Attr01'
    ,Attr02 AS '@Attr02'
    ,Attr03 AS '@Attr03'
    ,Attr04 AS '@Attr04'
    FROM Src
    WHERE EL3 = 'E202020'
    FOR XML PATH('E202020'),TYPE
    ) AS 'node()'
    FROM Src
    WHERE EL2 = 'E2020' AND (EL1 <>'' AND EL3 ='')
    FOR XML PATH('E2020'),TYPE
    FROM Src
    WHERE EL1 = 'E20' AND (EL2 ='' AND EL3 ='')
    FOR XML PATH('E20'),TYPE) AS 'node()'
    FOR XML PATH(''),ROOT('root')
    If I get a few hundreds of rows, how huge the script should be. Does anyone have better solution for this? Thanks.
    Tao

    wBob,
    Thanks! And sorry for late feedback.
    The XSD requires the xml structures like the following
    <Schools>
    <School01>Some school</School01>
    <School02>Some other school</School02>
    </Schools>
    I have to use the number in the element name. 
    Right now I just use the nested FOR XML PATH, although I have to write thousand lines code.
    Thanks anyway.
    Tao
    Tao

  • Extractvalue giving ORA-00932 when used in PL/SQL

    Hi,
    When I use the extractvalue function from within PL/SQL I get this error:
    ORA-00932: inconsistent datatypes: expected NUMBER got
    SINAPP.body.contentType1898_T
    The same SQL statement run from SQL Plus gives me the correct result. Is there any difference in calling this function from within PL/SQL?
    This is my SQL:
    select extractvalue (value(p),
    '/NewsML/NewsItem/NewsComponent/ContentItem/DataContent/body/body.content')
    into story from sin_xml_cx_temp p where
    extract(value(p),
    '/NewsML/NewsItem/NewsComponent/AdministrativeMetadata/FileName/text()').getStringval() = '39039859.xml';
    The Oracle version we are using is 9.2.0.3
    Here is the XML schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="http://www.sin.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sin.com" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified">
    <!-- enabling xml:lang attribute -->
    <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
    <xs:complexType name="AdministrativeMetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="FileName" type="FileNameType" minOccurs="0"/>
    <xs:element name="SystemIdentifier" type="SystemIdentifierType" minOccurs="0"/>
    <xs:element name="Provider" type="ProviderType" minOccurs="0"/>
    <xs:element name="Creator" type="CreatorType" minOccurs="0"/>
    <xs:element name="Source" type="SourceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Contributor" type="ContributorType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <!-- All attributes are optional by default!!! -->
    </xs:complexType>
    <xs:complexType name="AssociatedWithType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="BasisForChoiceType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Rank" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    <!-- The simpleContent element contains extensions or restrictions on a text-only complex
    type or on a simple type as content and contains no elements. -->
    </xs:complexType>
    <!-- A mixed complex type element can contain attributes, elements, and text -->
    <xs:complexType name="ByLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CatalogType">
    <xs:sequence>
    <xs:element name="Resource" type="ResourceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="TopicUse" type="TopicUseType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CharacteristicsType">
    <xs:sequence>
    <xs:element name="SizeInBytes" type="SizeInBytesType" minOccurs="0"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CommentType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="TranslationOf" type="xs:IDREF"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="ContentItemType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="MediaType" type="MediaTypeType" minOccurs="0"/>
    <xs:element name="Format" type="FormatType" minOccurs="0"/>
    <xs:element name="MimeType" type="MimeTypeType" minOccurs="0"/>
    <xs:element name="Notation" type="NotationType" minOccurs="0"/>
    <xs:element name="Characteristics" type="CharacteristicsType" minOccurs="0"/>
    <xs:choice minOccurs="0">
    <xs:element name="Encoding" type="EncodingType"/>
    <xs:element name="DataContent" type="DataContentType"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ContributorType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CopyrightType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="CopyrightHolder" type="CopyrightHolderType"/>
    <xs:element name="CopyrightDate" type="CopyrightDateType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CopyrightDateType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CopyrightHolderType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CopyrightLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CreatorType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CreditLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="DataContentType" mixed="true">
    <xs:sequence>
    <xs:element name="head" type="headType"/>
    <xs:element name="body" type="bodyType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="DateAndTimeType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:element name="DateId" type="xs:string"/>
    <xs:complexType name="DateLabelType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="DateLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="DefaultVocabularyForType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Context" type="xs:string" use="required"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="DeleteType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="DerivedFromType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="DescriptionType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="Variant" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="DescriptiveMetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="Language" type="LanguageType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Genre" type="GenreType" minOccurs="0"/>
    <xs:element name="SubjectCode" type="SubjectCodeType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="OfInterestTo" type="OfInterestToType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="TopicOccurrence" type="TopicOccurrenceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="EncodingType">
    <xs:choice minOccurs="0">
    <xs:element name="Encoding" type="EncodingType"/>
    <xs:element name="DataContent" type="DataContentType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Notation" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="EndDateType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="FileNameType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="FirstCreatedType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="FormalNameType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="FormatType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="FutureStatusType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="GenreType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="GeographyType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="HeadLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="IdentificationType">
    <xs:sequence>
    <xs:element name="NewsIdentifier" type="NewsIdentifierType"/>
    <xs:element name="NameLabel" type="NameLabelType" minOccurs="0"/>
    <xs:element name="DateLabel" type="DateLabelType" minOccurs="0"/>
    <xs:element name="Label" type="LabelType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="InsertAfterType" mixed="true">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="InsertBeforeType" mixed="true">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="InstructionType">
    <xs:sequence>
    <xs:element name="RevisionStatus" type="RevisionStatusType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="KeywordLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="LabelType">
    <xs:sequence>
    <xs:element name="LabelType" type="LabelTypeType"/>
    <xs:element name="LabelText" type="LabelTextType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="LabelTextType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="LabelTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="LanguageType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="LimitationsType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MediaTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="MetadataType" type="MetadataTypeType"/>
    <xs:element name="Property" type="PropertyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MetadataTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MimeTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NameLabelType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="NewsComponentType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicSet" type="TopicSetType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Role" type="RoleType" minOccurs="0"/>
    <xs:element name="BasisForChoice" type="BasisForChoiceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="NewsLines" type="NewsLinesType" minOccurs="0"/>
    <xs:element name="AdministrativeMetadata" type="AdministrativeMetadataType" minOccurs="0"/>
    <xs:element name="RightsMetadata" type="RightsMetadataType" minOccurs="0"/>
    <xs:element name="DescriptiveMetadata" type="DescriptiveMetadataType" minOccurs="0"/>
    <xs:element name="Metadata" type="MetadataType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:choice minOccurs="0">
    <xs:choice maxOccurs="unbounded">
    <xs:element name="NewsItem" type="NewsItemType"/>
    <xs:element name="NewsItemRef" type="NewsItemRefType"/>
    </xs:choice>
    <xs:element name="NewsComponent" type="NewsComponentType" maxOccurs="unbounded"/>
    <xs:element name="ContentItem" type="ContentItemType" maxOccurs="unbounded"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Essential" default="no">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="yes"/>
    <xs:enumeration value="no"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="EquivalentsList" default="no">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="yes"/>
    <xs:enumeration value="no"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="NewsEnvelopeType">
    <xs:sequence>
    <xs:element name="TransmissionId" type="TransmissionIdType" minOccurs="0"/>
    <xs:element name="SentFrom" type="SentFromType" minOccurs="0"/>
    <xs:element name="SentTo" type="SentToType" minOccurs="0"/>
    <xs:element name="DateAndTime" type="DateAndTimeType"/>
    <xs:element name="NewsService" type="NewsServiceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="NewsProduct" type="NewsProductType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Priority" type="PriorityType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsIdentifierType">
    <xs:sequence>
    <xs:element name="ProviderId" type="ProviderIdType"/>
    <xs:element ref="DateId"/>
    <xs:element name="NewsItemId" type="NewsItemIdType"/>
    <xs:element name="RevisionId" type="RevisionIdType"/>
    <xs:element ref="PublicIdentifier"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="NewsItemType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="Identification" type="IdentificationType"/>
    <xs:element name="NewsManagement" type="NewsManagementType"/>
    <xs:choice minOccurs="0">
    <xs:element name="NewsComponent" type="NewsComponentType"/>
    <xs:element name="Update" type="UpdateType" maxOccurs="unbounded"/>
    <xs:element name="TopicSet" type="TopicSetType"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="NewsItemIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="NewsItemRefType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsItemTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsLineType">
    <xs:sequence>
    <xs:element name="NewsLineType" type="NewsLineTypeType"/>
    <xs:element name="NewsLineText" type="NewsLineTextType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsLineTextType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="NewsLineTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsLinesType">
    <xs:sequence>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:element name="HeadLine" type="HeadLineType"/>
    <xs:element name="SubHeadLine" type="SubHeadLineType" minOccurs="0"/>
    </xs:sequence>
    <xs:element name="ByLine" type="ByLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="DateLine" type="DateLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="CreditLine" type="CreditLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="CopyrightLine" type="CopyrightLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="RightsLine" type="RightsLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="SeriesLine" type="SeriesLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="SlugLine" type="SlugLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="KeywordLine" type="KeywordLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="NewsLine" type="NewsLineType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:element name="NewsML" xdb:defaultTable="SIN_XML_CX_TEMP">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicSet" type="TopicSetType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:sequence>
    <xs:element name="NewsEnvelope" type="NewsEnvelopeType"/>
    <xs:element name="NewsItem" type="NewsItemType" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    <xs:complexType name="NewsManagementType">
    <xs:sequence>
    <xs:element name="NewsItemType" type="NewsItemTypeType"/>
    <xs:element name="FirstCreated" type="FirstCreatedType"/>
    <xs:element name="ThisRevisionCreated" type="ThisRevisionCreatedType"/>
    <xs:element name="Status" type="StatusType"/>
    <xs:element name="StatusWillChange" type="StatusWillChangeType" minOccurs="0"/>
    <xs:element name="Urgency" type="UrgencyType" minOccurs="0"/>
    <xs:element name="RevisionHistory" type="RevisionHistoryType" minOccurs="0"/>
    <xs:element name="DerivedFrom" type="DerivedFromType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="AssociatedWith" type="AssociatedWithType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Instruction" type="InstructionType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsProductType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsServiceType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NotationType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="OfInterestToType">
    <xs:sequence>
    <xs:element name="Relevance" type="RelevanceType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="OriginType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="PartyType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="Topic" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="PriorityType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="PropertyType">
    <xs:sequence>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    <xs:attribute name="Value" type="xs:string"/>
    <xs:attribute name="ValueRef" type="xs:string"/>
    <xs:attribute name="AllowedValues" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ProviderType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ProviderIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Vocabulary" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:element name="PublicIdentifier" type="xs:string"/>
    <xs:complexType name="RelevanceType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ReplaceType" mixed="true">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="ResourceType">
    <xs:sequence>
    <xs:element name="Urn" type="UrnType" minOccurs="0"/>
    <xs:element name="Url" type="UrlType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="DefaultVocabularyFor" type="DefaultVocabularyForType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RevisionHistoryType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="RevisionIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="PreviousRevision" type="xs:string" use="required"/>
    <xs:attribute name="Update" type="xs:string" use="required"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="RevisionStatusType">
    <xs:sequence>
    <xs:element name="Status" type="StatusType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Revision" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RightsHolderType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RightsLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="RightsMetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="Copyright" type="CopyrightType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="UsageRights" type="UsageRightsType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RoleType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SentFromType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SentToType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SeriesLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="SizeInBytesType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="SlugLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="SourceType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="StartDateType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="StatusType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="StatusWillChangeType">
    <xs:sequence>
    <xs:element name="FutureStatus" type="FutureStatusType"/>
    <xs:element name="DateAndTime" type="DateAndTimeType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubHeadLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="SubjectType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectCodeType">
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:choice>
    <xs:element name="Subject" type="SubjectType"/>
    <xs:element name="SubjectMatter" type="SubjectMatterType"/>
    <xs:element name="SubjectDetail" type="SubjectDetailType"/>
    </xs:choice>
    <xs:element name="SubjectQualifier" type="SubjectQualifierType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectDetailType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectMatterType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectQualifierType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SystemIdentifierType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="ThisRevisionCreatedType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="TopicType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicType" type="TopicTypeType" maxOccurs="unbounded"/>
    <xs:element name="FormalName" type="FormalNameType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Description" type="DescriptionType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Details" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicOccurrenceType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    <xs:attribute name="Topic" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicSetType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicSetRef" type="TopicSetRefType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Topic" type="TopicType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicSetRefType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="TopicSet" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicUseType">
    <xs:attribute name="Topic" type="xs:string" use="required"/>
    <xs:attribute name="Context" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TransmissionIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Repeat" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="UpdateType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="InsertBefore" type="InsertBeforeType"/>
    <xs:element name="InsertAfter" type="InsertAfterType"/>
    <xs:element name="Replace" type="ReplaceType"/>
    <xs:element name="Delete" type="DeleteType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="UrgencyType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="UrlType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="UrnType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="UsageRightsType">
    <xs:sequence>
    <xs:element name="UsageType" type="UsageTypeType" minOccurs="0"/>
    <xs:element name="Geography" type="GeographyType" minOccurs="0"/>
    <xs:element name="RightsHolder" type="RightsHolderType" minOccurs="0"/>
    <xs:element name="Limitations" type="LimitationsType" minOccurs="0"/>
    <xs:element name="StartDate" type="StartDateType" minOccurs="0"/>
    <xs:element name="EndDate" type="EndDateType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="UsageTypeType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="bodyType">
    <xs:sequence>
    <xs:element name="body.head" type="body.headType" xdb:SQLName="BODY_HEAD"/>
    <xs:element name="body.content" type="body.contentType" xdb:SQLName="BODY_CONTENT"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="body.contentType">
    <xs:choice maxOccurs="unbounded">
    <xs:element ref="p"/>
    <xs:element ref="pre"/>
    </xs:choice>
    </xs:complexType>
    <xs:complexType name="body.headType">
    <xs:sequence>
    <xs:element ref="distributor"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="distributor" type="xs:string"/>
    <xs:complexType name="headType">
    <xs:sequence>
    <xs:element name="meta" type="metaType" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="metaType">
    <xs:attribute name="name" type="xs:NMTOKEN" use="required"/>
    <xs:attribute name="content" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:element name="p" type="xs:string"/>
    <xs:element name="pre" type="xs:string"/>
    </xs:schema>

    Hi,
    When I use the extractvalue function from within PL/SQL I get this error:
    ORA-00932: inconsistent datatypes: expected NUMBER got
    SINAPP.body.contentType1898_T
    The same SQL statement run from SQL Plus gives me the correct result. Is there any difference in calling this function from within PL/SQL?
    This is my SQL:
    select extractvalue (value(p),
    '/NewsML/NewsItem/NewsComponent/ContentItem/DataContent/body/body.content')
    into story from sin_xml_cx_temp p where
    extract(value(p),
    '/NewsML/NewsItem/NewsComponent/AdministrativeMetadata/FileName/text()').getStringval() = '39039859.xml';
    The Oracle version we are using is 9.2.0.3
    Here is the XML schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="http://www.sin.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sin.com" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified">
    <!-- enabling xml:lang attribute -->
    <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
    <xs:complexType name="AdministrativeMetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="FileName" type="FileNameType" minOccurs="0"/>
    <xs:element name="SystemIdentifier" type="SystemIdentifierType" minOccurs="0"/>
    <xs:element name="Provider" type="ProviderType" minOccurs="0"/>
    <xs:element name="Creator" type="CreatorType" minOccurs="0"/>
    <xs:element name="Source" type="SourceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Contributor" type="ContributorType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <!-- All attributes are optional by default!!! -->
    </xs:complexType>
    <xs:complexType name="AssociatedWithType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="BasisForChoiceType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Rank" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    <!-- The simpleContent element contains extensions or restrictions on a text-only complex
    type or on a simple type as content and contains no elements. -->
    </xs:complexType>
    <!-- A mixed complex type element can contain attributes, elements, and text -->
    <xs:complexType name="ByLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CatalogType">
    <xs:sequence>
    <xs:element name="Resource" type="ResourceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="TopicUse" type="TopicUseType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CharacteristicsType">
    <xs:sequence>
    <xs:element name="SizeInBytes" type="SizeInBytesType" minOccurs="0"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CommentType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="TranslationOf" type="xs:IDREF"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="ContentItemType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="MediaType" type="MediaTypeType" minOccurs="0"/>
    <xs:element name="Format" type="FormatType" minOccurs="0"/>
    <xs:element name="MimeType" type="MimeTypeType" minOccurs="0"/>
    <xs:element name="Notation" type="NotationType" minOccurs="0"/>
    <xs:element name="Characteristics" type="CharacteristicsType" minOccurs="0"/>
    <xs:choice minOccurs="0">
    <xs:element name="Encoding" type="EncodingType"/>
    <xs:element name="DataContent" type="DataContentType"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ContributorType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CopyrightType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="CopyrightHolder" type="CopyrightHolderType"/>
    <xs:element name="CopyrightDate" type="CopyrightDateType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CopyrightDateType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CopyrightHolderType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CopyrightLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CreatorType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CreditLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="DataContentType" mixed="true">
    <xs:sequence>
    <xs:element name="head" type="headType"/>
    <xs:element name="body" type="bodyType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="DateAndTimeType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:element name="DateId" type="xs:string"/>
    <xs:complexType name="DateLabelType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="DateLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="DefaultVocabularyForType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Context" type="xs:string" use="required"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="DeleteType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="DerivedFromType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="DescriptionType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="Variant" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="DescriptiveMetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="Language" type="LanguageType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Genre" type="GenreType" minOccurs="0"/>
    <xs:element name="SubjectCode" type="SubjectCodeType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="OfInterestTo" type="OfInterestToType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="TopicOccurrence" type="TopicOccurrenceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="EncodingType">
    <xs:choice minOccurs="0">
    <xs:element name="Encoding" type="EncodingType"/>
    <xs:element name="DataContent" type="DataContentType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Notation" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="EndDateType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="FileNameType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="FirstCreatedType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="FormalNameType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="FormatType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="FutureStatusType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="GenreType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="GeographyType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="HeadLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="IdentificationType">
    <xs:sequence>
    <xs:element name="NewsIdentifier" type="NewsIdentifierType"/>
    <xs:element name="NameLabel" type="NameLabelType" minOccurs="0"/>
    <xs:element name="DateLabel" type="DateLabelType" minOccurs="0"/>
    <xs:element name="Label" type="LabelType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="InsertAfterType" mixed="true">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="InsertBeforeType" mixed="true">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="InstructionType">
    <xs:sequence>
    <xs:element name="RevisionStatus" type="RevisionStatusType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="KeywordLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="LabelType">
    <xs:sequence>
    <xs:element name="LabelType" type="LabelTypeType"/>
    <xs:element name="LabelText" type="LabelTextType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="LabelTextType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="LabelTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="LanguageType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="LimitationsType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MediaTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="MetadataType" type="MetadataTypeType"/>
    <xs:element name="Property" type="PropertyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MetadataTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MimeTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NameLabelType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="NewsComponentType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicSet" type="TopicSetType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Role" type="RoleType" minOccurs="0"/>
    <xs:element name="BasisForChoice" type="BasisForChoiceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="NewsLines" type="NewsLinesType" minOccurs="0"/>
    <xs:element name="AdministrativeMetadata" type="AdministrativeMetadataType" minOccurs="0"/>
    <xs:element name="RightsMetadata" type="RightsMetadataType" minOccurs="0"/>
    <xs:element name="DescriptiveMetadata" type="DescriptiveMetadataType" minOccurs="0"/>
    <xs:element name="Metadata" type="MetadataType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:choice minOccurs="0">
    <xs:choice maxOccurs="unbounded">
    <xs:element name="NewsItem" type="NewsItemType"/>
    <xs:element name="NewsItemRef" type="NewsItemRefType"/>
    </xs:choice>
    <xs:element name="NewsComponent" type="NewsComponentType" maxOccurs="unbounded"/>
    <xs:element name="ContentItem" type="ContentItemType" maxOccurs="unbounded"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Essential" default="no">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="yes"/>
    <xs:enumeration value="no"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="EquivalentsList" default="no">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="yes"/>
    <xs:enumeration value="no"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="NewsEnvelopeType">
    <xs:sequence>
    <xs:element name="TransmissionId" type="TransmissionIdType" minOccurs="0"/>
    <xs:element name="SentFrom" type="SentFromType" minOccurs="0"/>
    <xs:element name="SentTo" type="SentToType" minOccurs="0"/>
    <xs:element name="DateAndTime" type="DateAndTimeType"/>
    <xs:element name="NewsService" type="NewsServiceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="NewsProduct" type="NewsProductType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Priority" type="PriorityType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsIdentifierType">
    <xs:sequence>
    <xs:element name="ProviderId" type="ProviderIdType"/>
    <xs:element ref="DateId"/>
    <xs:element name="NewsItemId" type="NewsItemIdType"/>
    <xs:element name="RevisionId" type="RevisionIdType"/>
    <xs:element ref="PublicIdentifier"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="NewsItemType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="Identification" type="IdentificationType"/>
    <xs:element name="NewsManagement" type="NewsManagementType"/>
    <xs:choice minOccurs="0">
    <xs:element name="NewsComponent" type="NewsComponentType"/>
    <xs:element name="Update" type="UpdateType" maxOccurs="unbounded"/>
    <xs:element name="TopicSet" type="TopicSetType"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="NewsItemIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="NewsItemRefType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsItemTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsLineType">
    <xs:sequence>
    <xs:element name="NewsLineType" type="NewsLineTypeType"/>
    <xs:element name="NewsLineText" type="NewsLineTextType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsLineTextType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="NewsLineTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsLinesType">
    <xs:sequence>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:element name="HeadLine" type="HeadLineType"/>
    <xs:element name="SubHeadLine" type="SubHeadLineType" minOccurs="0"/>
    </xs:sequence>
    <xs:element name="ByLine" type="ByLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="DateLine" type="DateLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="CreditLine" type="CreditLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="CopyrightLine" type="CopyrightLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="RightsLine" type="RightsLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="SeriesLine" type="SeriesLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="SlugLine" type="SlugLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="KeywordLine" type="KeywordLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="NewsLine" type="NewsLineType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:element name="NewsML" xdb:defaultTable="SIN_XML_CX_TEMP">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicSet" type="TopicSetType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:sequence>
    <xs:element name="NewsEnvelope" type="NewsEnvelopeType"/>
    <xs:element name="NewsItem" type="NewsItemType" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    <xs:complexType name="NewsManagementType">
    <xs:sequence>
    <xs:element name="NewsItemType" type="NewsItemTypeType"/>
    <xs:element name="FirstCreated" type="FirstCreatedType"/>
    <xs:element name="ThisRevisionCreated" type="ThisRevisionCreatedType"/>
    <xs:element name="Status" type="StatusType"/>
    <xs:element name="StatusWillChange" type="StatusWillChangeType" minOccurs="0"/>
    <xs:element name="Urgency" type="UrgencyType" minOccurs="0"/>
    <xs:element name="RevisionHistory" type="RevisionHistoryType" minOccurs="0"/>
    <xs:element name="DerivedFrom" type="DerivedFromType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="AssociatedWith" type="AssociatedWithType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Instruction" type="InstructionType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsProductType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsServiceType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NotationType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="OfInterestToType">
    <xs:sequence>
    <xs:element name="Relevance" type="RelevanceType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="OriginType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="PartyType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="Topic" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="PriorityType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="PropertyType">
    <xs:sequence>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    <xs:attribute name="Value" type="xs:string"/>
    <xs:attribute name="ValueRef" type="xs:string"/>
    <xs:attribute name="AllowedValues" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ProviderType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ProviderIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Vocabulary" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:element name="PublicIdentifier" type="xs:string"/>
    <xs:complexType name="RelevanceType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ReplaceType" mixed="true">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="ResourceType">
    <xs:sequence>
    <xs:element name="Urn" type="UrnType" minOccurs="0"/>
    <xs:element name="Url" type="UrlType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="DefaultVocabularyFor" type="DefaultVocabularyForType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RevisionHistoryType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="RevisionIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="PreviousRevision" type="xs:string" use="required"/>
    <xs:attribute name="Update" type="xs:string" use="required"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="RevisionStatusType">
    <xs:sequence>
    <xs:element name="Status" type="StatusType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Revision" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RightsHolderType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RightsLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="RightsMetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="Copyright" type="CopyrightType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="UsageRights" type="UsageRightsType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RoleType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SentFromType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SentToType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SeriesLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="SizeInBytesType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="SlugLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="SourceType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="StartDateType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="StatusType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="StatusWillChangeType">
    <xs:sequence>
    <xs:element name="FutureStatus" type="FutureStatusType"/>
    <xs:element name="DateAndTime" type="DateAndTimeType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubHeadLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="SubjectType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectCodeType">
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:choice>
    <xs:element name="Subject" type="SubjectType"/>
    <xs:element name="SubjectMatter" type="SubjectMatterType"/>
    <xs:element name="SubjectDetail" type="SubjectDetailType"/>
    </xs:choice>
    <xs:element name="SubjectQualifier" type="SubjectQualifierType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectDetailType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectMatterType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectQualifierType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SystemIdentifierType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="ThisRevisionCreatedType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="TopicType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicType" type="TopicTypeType" maxOccurs="unbounded"/>
    <xs:element name="FormalName" type="FormalNameType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Description" type="DescriptionType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Details" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicOccurrenceType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    <xs:attribute name="Topic" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicSetType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicSetRef" type="TopicSetRefType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Topic" type="TopicType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicSetRefType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="TopicSet" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicUseType">
    <xs:attribute name="Topic" type="xs:string" use="required"/>
    <xs:attribute name="Context" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TransmissionIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Repeat" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="UpdateType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="InsertBefore" type="InsertBeforeType"/>
    <xs:element name="InsertAfter" type="InsertAfterType"/>
    <xs:element name="Replace" type="ReplaceType"/>
    <xs:element name="Delete" type="DeleteType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="UrgencyType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="UrlType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="UrnType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="UsageRightsType">
    <xs:sequence>
    <xs:element name="UsageType" type="UsageTypeType" minOccurs="0"/>
    <xs:element name="Geography" type="GeographyType" minOccurs="0"/>
    <xs:element name="RightsHolder" type="RightsHolderType" minOccurs="0"/>
    <xs:element name="Limitations" type="LimitationsType" minOccurs="0"/>
    <xs:element name="StartDate" type="StartDateType" minOccurs="0"/>
    <xs:element name="EndDate" type="EndDateType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="UsageTypeType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="bodyType">
    <xs:sequence>
    <xs:element name="body.head" type="body.headType" xdb:SQLName="BODY_HEAD"/>
    <xs:element name="body.content" type="body.contentType" xdb:SQLName="BODY_CONTENT"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="body.contentType">
    <xs:choice maxOccurs="unbounded">
    <xs:element ref="p"/>
    <xs:element ref="pre"/>
    </xs:choice>
    </xs:complexType>
    <xs:complexType name="body.headType">
    <xs:sequence>
    <xs:element ref="distributor"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="distributor" type="xs:string"/>
    <xs:complexType name="headType">
    <xs:sequence>
    <xs:element name="meta" type="metaType" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="metaType">
    <xs:attribute name="name" type="xs:NMTOKEN" use="required"/>
    <xs:attribute name="content" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:element name="p" type="xs:string"/>
    <xs:element name="pre" type="xs:string"/>
    </xs:schema>

  • Error: PL/SQL ORA-00932 inconsistent datatype when using LONG value

    Good morning:
    I am using a work PL/SQL script where I am using a LONG value in a cursor. When I execute it, I am receiving:
    PL/SQL ORA-00932 inconsistent datatype:  expected NUMBER got LONG
    set serveroutput ON SIZE 1000000
    set heading off               
    set feedback off               
    set trimspool off              
    set echo off
    set term off                  
    set pagesize 0        
    SPOOL &so_outfile;
    DECLARE
      v_data_file          varchar2(30);
    --   v_sch_code            varchar2(10);
    --   v_instance_name       varchar2(10);
        ws_path            payroll.pybutfl.pybutfl_utl_file_path%TYPE;
        v_data_line           VARCHAR2 (2000)                              := NULL;
        fhandle_o             UTL_FILE.file_type;
        v_line_count          NUMBER                                       := 0;
        v_selected_count      NUMBER                                       := 0;
        v_error_count         NUMBER                                       := 0;
        v_written_count       NUMBER                                       := 0;
        v_error_text          VARCHAR2 (50)       := ' AMACONF_ERR: Unable to write the line. ';
        v_errm                VARCHAR2 (255);
        v_sqlerrm             VARCHAR2 (255);
        v_payment_type        VARCHAR2(10);
    CURSOR C1 IS
    select RTRIM
            AMRCONF_PIDM_ERR            ||'|'||
            AMRCONF_IDEN_CODE_ERR       ||'|'||
            AMRCONF_ENTRY_DATE_ERR      ||'|'||
            AMRCONF_CONFID_IND_ERR      ||'|'||
           *AMRCONF_COMMENT_ERR        ||'|'||*
            AMRSUBJ_SUBJ_CODE_ERR       ||'|'||
            ERROR_CODE                  ||'|'||
            ERROR_CODE_TEXT                 ) data_line
            from WSUALUMNI.AMRCONF_ERR;
    BEGIN
    DBMS_OUTPUT.put_line ('Program Generating AMACOMT Mass Update Error File ');
    IF UTL_FILE.is_open (fhandle_o)
        THEN  
       UTL_FILE.fclose (fhandle_o);
    END IF;
    /* Name The File Here */
    v_data_file := ('Amaconf_error.txt');
    SELECT RTRIM (pybutfl_utl_file_path)
          INTO ws_path
          FROM payroll.pybutfl;
          fhandle_o := UTL_FILE.fopen (ws_path, v_data_file, 'w');
          DBMS_OUTPUT.put_line ('UTLFILE file for this run is: ' || ws_path||'/'||v_data_file);
          v_written_count := 0;  
    FOR c1_rec IN C1 LOOP
          BEGIN
            v_selected_count := v_selected_count + 1;
            v_data_line := rtrim(c1_rec.data_line);
            UTL_FILE.put_line (fhandle_o, v_data_line);
            v_written_count := v_written_count + 1;
        EXCEPTION
         WHEN OTHERS
          THEN
           DBMS_OUTPUT.put_line (v_error_text);
           v_error_count := v_error_count + 1;
        END;
    END LOOP;
         DBMS_OUTPUT.put_line ('Number of Records Selected: ' || v_selected_count);
         DBMS_OUTPUT.put_line ('Number of Records Written: ' || v_written_count);
          IF UTL_FILE.is_open (fhandle_o)
          THEN
             UTL_FILE.fclose (fhandle_o);
          END IF;
    END;
    SPOOL OFF;If I comment out the "AMRCONF_COMMENT_ERR ||'|'||" line, then the script works fine. The table was created as:
    Create Table WSUALUMNI.AMRCONF_ERR
        AMRCONF_PIDM_ERR             NUMBER (8)    NOT NULL,
        AMRCONF_IDEN_CODE_ERR        VARCHAR2(5)   NOT NULL,
        AMRCONF_ENTRY_DATE_ERR       DATE          NOT NULL,
        AMRCONF_CONFID_IND_ERR       VARCHAR2(1),
        AMRCONF_COMMENT_ERR          LONG,         
        AMRSUBJ_SUBJ_CODE_ERR        VARCHAR2(5)   NOT NULL,
        ERROR_CODE                   VARCHAR2(12)  NOT NULL,
        ERROR_CODE_TEXT              VARCHAR2(50)  NOT NULL
    ); I don't get what is the problem here in the script.

    Hi,
    Feew suggestions
    1) LONG is a deprecated type hence if possible start working on changing that column
    2) CLOB will your preferred datatype over LONG.
    3) you cannot use RTRIM on long.
    here is a very quick example
    drop table h
    create table h (x long,y varchar2(100))
    select rtrim(x) from h
    select rtrim(y) from hSolution:
    [http://www.oracle.com/technology/oramag/code/tips2003/052503.html]
    need a better solution change the datatype to clob and
    drop table h
    create table h (x clob,y varchar2(100))
    select  dbms_lob.substr( x, 4000, 1 ) from h
    select rtrim(y) from hCheers!!!
    Bhushan

  • ORA-00932 (Inconsistent datatype) on BLOB field in a view using Forms 6i

    Hi
    I created a table having a BLOB column and populate it with images and also make queries on that table using form 6i but when I use a view to build a form which built on that table when I try to query I receive the following error :
    ORA-00932:Inconsistent datatype
    The view created as simple as SELECT * FROM MY_TABLE and there is no problem with other columns in that view but BLOB column. I am using FORMS 6i (6.0.8.11.3)
    I would be so glad if someone could help me.
    thanx.

    I solved this problem by installing Forms 6i Patch 4a.
    It was so easy, but I don't know if there is easier way to solve this problem.
    Behrooz.

  • How to find out that particular structure is used in which tables

    Hello Friends,
    Most of the times through techinal information we come to know the table name for a particular field.And in se16 when i give that table name than system says its structure and not the table.So in se11 when i give that structure name in database table field, its shows all the field in that structure, but not the data stored in that field.
    So my question is how to find out that particular structure is used in which tables,so that i can view data stored in that structure?
    Thanking you guys in advance.
    Regards,
    Jitendra

    Dear,
    When you click on the technical information it will give the structure name and field, double click on the structure and it will take you the display structure screen, there you will have the where-used List icon (Ctrl + Shift + F3) at the top , click on that and it will show the options, select Database tables and execute, it will give the tables related to the structure, you can explore the list of tables and find where your required field is stored in them.
    Thanks & Regards,
    Vijaya Bhaskar A

  • ORA-00932 Error using 11g and the SDO_RELATE function. Works fine in 10g

    Hello,
    If I run this query in Oracle 11g:
    SELECT M.FID, MAX(M.VERSION) AS VERSION
    FROM SW_PB.A_ROADNODEINFORMATION M, SW_PB.ROADNODE N
    WHERE M.REFERENCETOROADNODE = N.FID
    AND M.NODEVERSION = N.VERSION
    AND M.CATALOGUEID <= 477
    AND MDSYS.SDO_RELATE( N.GEOM, MDSYS.SDO_GEOMETRY(2003,81989,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(120000,0,160000,40000)),'MASK=ANYINTERACT QUERYTYPE=WINDOW') = 'TRUE'
    GROUP BY M.FID;
    I get an error regarding the N.GEOM field. The error is as follows:
    ORA-00932: inconsistent datatypes: expected - got MDSYS.SDO_ELEM_INFO_ARRAY
    The same query runs fine on a 10g database with the same data. I've even truncated the N table and still get the error. I've rebuilt the index but it makes no difference and the metadata is exactly the same for this table as it is for other tables that are involved in a similar query.
    It looks like a bug to me but just wondered if anyone else had come across this?
    Thanks,
    Peter.

    Thanks for the reply. I'm really sorry but I haven't created trace files like this for a very long time and have forgotten the best way to read them. This is the start of the trace file, any help with reformatting it would be greatly appreciated.
    Thanks,
    Peter.
    *** 2009-04-23 17:09:22.902
    ----- Error Stack Dump -----
    *** 2009-04-23 17:09:22.917
    ORA-00932: inconsistent datatypes: expected - got MDSYS.SDO_ELEM_INFO_ARRAY
    ----- Current SQL Statement for this session (sql_id=br02jqdwy2utk) -----
    SELECT M.FID, MAX(M.VERSION) AS VERSION
    FROM SW_PB.A_ROADNODEINFORMATION M, SW_PB.ROADNODE N
    WHERE M.REFERENCETOROADNODE = N.FID
    AND M.NODEVERSION = N.VERSION
    AND M.CATALOGUEID <= 477
    AND MDSYS.SDO_RELATE( N.GEOM, MDSYS.SDO_GEOMETRY(2003,81989,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(120000,0,160000,40000)),'MASK=ANYINTERACT QUERYTYPE=WINDOW') = 'TRUE'
    GROUP BY M.FID
    ----- Call Stack Trace -----
    calling call entry argument values in hex
    location type point (? means dubious value)
    skdstdst()+114      CALLrel  kgdsdst()+0 FB783A0 2
    ksedst1()+91        CALLrel  skdstdst()+0
    ksedst()+50         CALLrel  ksedst1()+0 0 1
    dbkedDefDump()+298  CALLrel  ksedst()+0 0
    5
    ksedmp()+40         CALLrel  dbkedDefDump()+0 3 0
    _dbkdaKsdActDriver(  CALLreg  00000000             3
    )+841
    _dbgdaExecuteAction  CALLreg  00000000             7B50420 FB79A4C
    ()+63
    dbgdaRunAction()+3  CALLrel  dbgdaExecuteAction 7B50420 4D4C148 20C0002
    02 ()+0 FB79A4C
    dbgdRunActions()+4  CALLrel  dbgdaRunAction()+0 7B50420 A789E54
    4
    dbgdProcessEventAc  CALLrel  dbgdRunActions()+0 7B50420 A789E74
    tions()+446
    __VInfreq__dbgdChkE CALLrel _dbgdProcessEventAc  7B50420 120A3370 A789F64
    ventKgErr()+237 tions()+0
    dbkdChkEventRdbmsE  CALLrel  dbgdChkEventKgErr( 7B50420 A7C06F4 3A4
    rr()+33 )+0
    __PGOSF99__ksfpec() CALLrel _dbkdChkEventRdbmsE  3A4
    +110 rr()+0
    _dbgePostErrorKGE()  CALLreg  00000000             120A3370 3A4
    +1601
    dbkePostKGEkgsf() CALLrel _dbgePostErrorKGE()  120A3370 A772020 3A4
    +49 +0
    _kgeade()+268        CALLreg  00000000             120A3370 A772020 3A4
    kgesev()+54         CALLrel  kgeade()+0
    kgesec2()+18        CALLrel  kgesev()+0 120A3370 A772020 3A4 2
    FB7A200
    qctErr932()+217     CALLrel  kgesec2()+0 120A3370 A772020 3A4 1 1
    FB7A468 1 19 FB7A218
    qctErrConvertDataT  CALLrel  qctErr932()+0 995FBCC0 120A3370 F6 FB7A468
    ype()+82 7B C2E85B4 995FBCC0 120A3370
    FB7A468 0 0 FB7A468 0 204
    qecgby()+240        CALLrel  qctErrConvertDataT 995FBCC0 120A3370 F6 0 0 7B
    ype()+0 C2E85B4
    qecpqbcheck()+75    CALLrel  qecgby()+0
    qecdrv()+161        CALLrel  qecpqbcheck()+0 C2ECD7C 0 0 0
    qecdrv()+74         CALLrel  qecdrv()+0
    kkqcttcalo()+383    CALLrel  qecdrv()+0 C2EFBAC
    kkqctdrvGBP()+1841  CALLrel  kkqcttcalo()+0 C2EFBAC 0 C2EFBAC 166A5D4 0 2
    __VInfreq__kkqgbpTr CALLrel _kkqctdrvGBP()+0     A730DD8
    avChkTran()+193
    _qksqbApplyToQbcLoc  CALLreg  00000000             A730DD8 FB7A9BC
    ()+536
    qksqbApplyToQbc()+  CALLrel  qksqbApplyToQbcLoc
    67 ()+0
    kkqctdrvTD()+1000   CALLrel  qksqbApplyToQbc()+ A730DD8 2EF2DA0 FB7A9BC 0
    0
    kkqgbpdrv()+88      CALLrel  kkqctdrvTD()+0 A754820 995FBDF4 6
    kkqdrv()+1520       CALLrel  kkqgbpdrv()+0 A754820 995FBDF4
    kkqctdrvIT()+698    CALLrel  kkqdrv()+0 A754820 0
    apadrv()+1205       CALLrel  kkqctdrvIT()+0 A754820 995FBDF4
    opitca()+1841       CALLrel  apadrv()+0 995FBDF4
    __PGOSF435__kksFull CALLrel _opitca()+0          A7CC9E4 995FBDF4
    TypeCheck()+15
    _rpiswu2()+560       CALLreg  00000000             FB7B718
    kksLoadChild()+860  CALLrel  rpiswu2()+0 AF495220 5 A77DCBB4 16
    8 94591E54 5 A77DCBE0 0 FB7B670
    615F44 0 FB7B718 0
    kxsGetRuntimeLock(  CALLrel  kksLoadChild()+0 120A3370 AE9130D8 FB7C090
    )+1421
    kksfbc()+8954       CALLrel  kxsGetRuntimeLock( 120A3370 A7CC9E4 FB7C090 3 1
    )+0
    kkspsc0()+1882      CALLrel  kksfbc()+0 A7CC9E4 3 108 FB7D2D8 1BB 0 0
    0
    kksParseCursor()+1  CALLrel  kkspsc0()+0
    43
    opiosq0()+2028      CALLrel  kksParseCursor()+0 FB7C610
    kpooprx()+273       CALLrel  opiosq0()+0 3 E FB7C734 A4
    kpoal8()+729        CALLrel  kpooprx()+0 FB7F214 FB7D2D8 1BA 1 0 A4
    _opiodr()+1224       CALLreg  00000000             5E 1C FB7F210
    _ttcpip()+2733       CALLreg  00000000             5E 1C FB7F210 0
    _opitsk()+1278       CALL???  00000000            
    opiino()+1067       CALLrel  opitsk()+0 0 0
    _opiodr()+1224       CALLreg  00000000             3C 4 FB7FC28
    opidrv()+807        CALLrel  opiodr()+0 3C 4 FB7FC28 0
    sou2o()+45          CALLrel  opidrv()+0 3C 4 FB7FC28
    opimaireal()+130 CALLrel _sou2o()+0           FB7FC1C 3C 4 FB7FC28
    opimai()+92         CALLrel  opimai_real()+0 2 FB7FC54
    OracleThreadStart@  CALLrel  opimai()+0
    4()+764
    77E6482C CALLreg 00000000
    00000000 CALL??? 00000000

  • Why Isn't xmlindex being used in slow query on binary xml table eval?

    I am running a slow simple query on Oracle database server 11.2.0.1 that is not using an xmlindex. Instead, a full table scan against the eval binary xml table occurs. Here is the query:
    select -- /*+ NO_XMLINDEX_REWRITE no_parallel(eval)*/
          defid from eval,
          XMLTable(XMLNAMESPACES(DEFAULT 'http://www.cigna.com/acme/domains/eval/2010/03',
          'http://www.cigna.com/acme/domains/derived/fact/2010/03' AS "ns7"),
          '$doc/eval/derivedFacts/ns7:derivedFact' passing eval.object_value as "doc" columns defid varchar2(100) path 'ns7:defId'
           ) eval_xml
    where eval_xml.defid in ('59543','55208'); The predicate is not selective at all - the returned row count is the same as the table row count (325,550 xml documents in the eval table). When different values are used bringing the row count down to ~ 33%, the xmlindex still isn't used - as would be expected in a purely relational nonXML environment.
    My question is why would'nt the xmlindex be used in a fast full scan manner versus a full table scan traversing the xml in each eval table document record?
    Would a FFS hint be applicable to an xmlindex domain-type index?
    Here is the xmlindex definition:
    CREATE INDEX "EVAL_XMLINDEX_IX" ON "EVAL" (OBJECT_VALUE)
      INDEXTYPE IS "XDB"."XMLINDEX" PARAMETERS
      ('XMLTable eval_idx_tab XMLNamespaces(DEFAULT ''http://www.cigna.com/acme/domains/eval/2010/03'',
      ''http://www.cigna.com/acme/domains/derived/fact/2010/03'' AS "ns7"),''/eval''
           COLUMNS defId VARCHAR2(100) path ''/derivedFacts/ns7:derivedFact/ns7:defId''');Here is the eval table definition:
    CREATE
      TABLE "N98991"."EVAL" OF XMLTYPE
        CONSTRAINT "EVAL_ID_PK" PRIMARY KEY ("EVAL_ID") USING INDEX PCTFREE 10
        INITRANS 4 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT
        1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1
        FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE
        DEFAULT) TABLESPACE "ACME_DATA" ENABLE
      XMLTYPE STORE AS SECUREFILE BINARY XML
        TABLESPACE "ACME_DATA" ENABLE STORAGE IN ROW CHUNK 8192 CACHE NOCOMPRESS
        KEEP_DUPLICATES STORAGE(INITIAL 106496 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS
        2147483645 PCTINCREASE 0 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT)
      ALLOW NONSCHEMA ALLOW ANYSCHEMA VIRTUAL COLUMNS
        "EVAL_DT" AS (SYS_EXTRACT_UTC(CAST(TO_TIMESTAMP_TZ(SYS_XQ_UPKXML2SQL(
        SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03"; (::)
    /eval/@eval_dt'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2),'SYYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') AS TIMESTAMP
    WITH
      TIME ZONE))),
        "EVAL_CAT" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@category'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        "ACME_MBR_ID" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@acmeMemberId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        "EVAL_ID" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@evalId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50)))
      PCTFREE 0 PCTUSED 80 INITRANS 4 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
        INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
        FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT
      TABLESPACE "ACME_DATA" ; Sample cleansed xml snippet:
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?><eval createdById="xxxx" hhhhMemberId="37e6f05a-88dc-41e9-a8df-2a2ac6d822c9" category="eeeeeeee" eval_dt="2012-02-11T23:47:02.645Z" evalId="12e007f5-b7c3-4da2-b8b8-4bf066675d1a" xmlns="http://www.xxxxx.com/vvvv/domains/eval/2010/03" xmlns:ns2="http://www.cigna.com/nnnn/domains/derived/fact/2010/03" xmlns:ns3="http://www.xxxxx.com/vvvv/domains/common/2010/03">
       <derivedFacts>
          <ns2:derivedFact>
             <ns2:defId>12345</ns2:defId>
             <ns2:defUrn>urn:mmmmrunner:Medical:Definition:DerivedFact:52657:1</ns2:defUrn>
             <ns2:factSource>tttt Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>boolean</ns2:type>
                <ns2:value>true</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
          <ns2:derivedFact>
             <ns2:defId>52600</ns2:defId>
             <ns2:defUrn>urn:ddddrunner:Medical:Definition:DerivedFact:52600:2</ns2:defUrn>
             <ns2:factSource>cccc Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>string</ns2:type>
                <ns2:value>null</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
          <ns2:derivedFact>
             <ns2:defId>59543</ns2:defId>
             <ns2:defUrn>urn:ddddunner:Medical:Definition:DerivedFact:52599:1</ns2:defUrn>
             <ns2:factSource>dddd Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>string</ns2:type>
                <ns2:value>INT</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
                With the repeating <ns2:derivedFact> element continuing under the <derivedFacts>The Oracle XML DB Developer's Guide 11g Release 2 isn't helping much...
    Any assitance much appreciated.
    Regards,
    Rick Blanchard

    odie 63, et. al.;
    Attached is the reworked select query, xmlindex, and 2ndary indexes. Note: though namespaces are used; we're not registering any schema defns.
    SELECT /*+ NO_USE_HASH(eval) +/ --/*+ NO_QUERY_REWRITE no_parallel(eval)*/
    eval_xml.eval_catt, df.defid FROM eval,
    --df.defid FROM eval,
    XMLTable(XMLNamespaces( DEFAULT 'http://www.cigna.com/acme/domains/eval/2010/03',
                            'http://www.cigna.com/acme/domains/derived/fact/2010/03' AS "ns7" ),
            '/eval' passing eval.object_value
             COLUMNS
               eval_catt VARCHAR2(50) path '@category',
               derivedFact XMLTYPE path '/derivedFacts/ns7:derivedFact')eval_xml,
    XMLTable(XMLNamespaces('http://www.cigna.com/acme/domains/derived/fact/2010/03' AS "ns7",
                              DEFAULT 'http://www.cigna.com/acme/domains/eval/2010/03'),
            '/ns7:derivedFact' passing eval_xml.derivedFact
             COLUMNS
               defid VARCHAR2(100) path 'ns7:defId') df
    WHERE df.defid IN ('52657','52599') AND eval_xml.eval_catt LIKE 'external';
    --where df.defid = '52657';
    SELECT /*+ NO_USE_HASH(eval +/ --/*+ NO_QUERY_REWRITE no_parallel(eval)*/
    eval_xml.eval_catt, df.defid FROM eval,
    --df.defid FROM eval,
    XMLTable(XMLNamespaces( DEFAULT 'http://www.cigna.com/acme/domains/eval/2010/03',
                            'http://www.cigna.com/acme/domains/derived/fact/2010/03' AS "ns7" ),
            '/eval' passing eval.object_value
             COLUMNS
               eval_catt VARCHAR2(50) path '@category',
               derivedFact XMLTYPE path '/derivedFacts/ns7:derivedFact')eval_xml,
    XMLTable(XMLNamespaces('http://www.cigna.com/acme/domains/derived/fact/2010/03' AS "ns7",
                              DEFAULT 'http://www.cigna.com/acme/domains/eval/2010/03'),
            '/ns7:derivedFact' passing eval_xml.derivedFact
             COLUMNS
               defid VARCHAR2(100) path 'ns7:defId') df
    WHERE df.defid IN ('52657','52599') AND eval_xml.eval_catt LIKE 'external';
    --where df.defid = '52657'; create index defid_2ndary_ix on eval_idx_tab_II (defID);
         eval_catt VARCHAR2(50) path ''@CATEGORY''');
    create index eval_catt_2ndary_ix on eval_idx_tab_I (eval_catt);The xmlindex is getting picked up but a couple of problesm:
    1. In the developemnt environment, no xml source records for defid '52657' or '52599' are being displayed - just an empty output set occurs; in spite of these values being present and stored in the source xml.
    This really has me stumped, as can query the eval table to see the actual xml defid vaues '52657' and '52599' exist. Something appears off with the query - which didn't return records even before the corrresponding xml index was created.
    2. The query still performs slowly, in spite of using the xmlindex. The execution plan shows a full table scan of eval occurring whether or not a HASH JOIN or MERGE JOIN (gets used in place of the HASH JOIN when the NO_USE_HASH(eval) int is used.
    3. Single column 2ndary indexes created respectively for eval_catt and defid are not used in the execution plan - which may be expected upon further consideration.
    In the process of running stats at this moment, to see if performance improves....
    At this point, really after why item '1.' is occurring?
    Edited by: RickBlanchardSRSCigna on Apr 16, 2012 1:33 PM

  • Field name DUMMY is reserved (Do not use structure as include in DB table)

    We are trying to add a custom field, e.g., called ZZZ in LIS Communication structure MCEKKO (Purchasing Document Header) by creating a new custom append structure and add the field ZZZ into it, then activate the new append structure, but get warning msg like "Field name DUMMY is reserved (Do not use structure as include in DB table)".
    We do find a field called DUMMY in the structure MCEKKO. How to get rid of the warning msg and successfully activate the new custom append structure with the new field ZZZ?
    We will give you reward points for correct solutions for the above problem!
    Thanks

    hi Dinesh,
    But we wonder why this new custom field appended can not be seen from the right frame of the extraction structure in LBWE?
    Any idea?
    Thanks

  • ORA-00932 while using nvl with trunc function

    What happens when trunc is executed on null?
    I am executing the following query:
    "select nvl(trunc(null),sysdate) from dual"
    and this throws "ORA-00932: inconsistent datatypes: expected NUMBER got DATE, error at Line:1 Column:23".
    Whereas "select nvl(null,sysdate) from dual" returns sysdate correctly.
    Also "select trunc(null) from dual" returns null only. So when the returned null is passed through nvl why am I getting exception?
    This is happening in ver 9.2.0.5.0 and 10.2.0.2.0
    There is another observation, which is an issue that we have found in our code, and while trying to fix that we saw the earlier observation.
    SELECT * FROM orgs, dual where
    trunc(SYSDATE) between trunc(orgs.effective_start_date) and nvl(trunc(orgs.effective_end_date),trunc(sysdate))
    Here effective start date and effective end date for orgs are null for all records.
    When we run this query on ver 9.2.0.5.0, this runs without any exception. But when we run this query on ver 10.2.0.2.0, we get the same exception, "ORA-00932: inconsistent datatypes: expected NUMBER got DATE, error at Line:2 Column:95".
    The join with dual is fake, in actual scenario we have join with other tables, but since we are able to replicate with dual, removed all other details to keep this simple.
    Now if we remove the join with dual, the query works fine in both the env.
    SELECT * FROM orgs where
    trunc(SYSDATE) between trunc(orgs.effective_start_date) and nvl(trunc(orgs.effective_end_date),trunc(sysdate))

    What happens when trunc is executed on null?
    I am executing the following query:
    "select nvl(trunc(null),sysdate) from dual"
    and this throws "ORA-00932: inconsistent datatypes:
    expected NUMBER got DATE, error at Line:1
    Column:23".
    Whereas "select nvl(null,sysdate) from dual" returns
    sysdate correctly.
    Also "select trunc(null) from dual" returns null
    only. So when the returned null is passed through nvl
    why am I getting exception?
    This is happening in ver 9.2.0.5.0 and 10.2.0.2.0The first parameter to NVL is determining the expected datatype of the returned column, with the trunc function defaulting that to NUMBER because it's parameter is NULL. The second parameter to NVL needs to match that datatype which it doesn't because it is a date.
    SQL> select nvl(trunc(sysdate), sysdate) as mydate from dual;
    MYDATE
    26/05/2006 00:00:00
    SQL> select nvl(trunc(null), sysdate) as mydate from dual;
    select nvl(trunc(null), sysdate) as mydate from dual
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected NUMBER got DATE
    SQL> select nvl(trunc(123), sysdate) as mydate from dual;
    select nvl(trunc(123), sysdate) as mydate from dual
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected NUMBER got DATE
    SQL>

  • ORA-02374: conversion error loading table during import using IMPDP

    HI All,
    We are trying to migrate the data from one database to an other database.
    The source database is having character set
    SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';
    VALUE
    US7ASCII
    The destination database is having character set
    SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';
    VALUE
    AL32UTF8
    We took an export of the whole database using expdp and when we try to import to the destination database using impdp. We are getting the following error.
    ORA-02374: conversion error loading table <TABLE_NAME>
    ORA-12899: value too large for column <COLUMN NAME> (actual: 42, maximum: 40)
    ORA-02372: data for row:<COLUMN NAME> : 0X'4944454E5449464943414349E44E204445204C4C414D414441'
    Kindly let me know how to overcome this issue in destination.
    Thanks & Regards,
    Vikas Krishna

    Hi,
    You can overcome this issue by increasing the column width in the target database for the max value required for all data to be imported successfully in the table.
    Regards

  • Records from multiple table in Forms using Structure

    Hi all,
    I thought of bringing records from more than one table to smart forms.I have done the same by using two internal tables but not using with globally declared structure.Is it like this:
    1.Create the global structure
    2.In driver program create a internal table
    3.Pull the data using select statement
    4.Pass the internal table to smartforms-> Here I dont understand how.Usually In smartforms we declare internal tables of table type like 'itable type zgkmaster'
    How to pass the internal table we created using structure to smartforms?
    Thanks

    Hi Gopi,
    the procedure u r telling is correct.
    create the structure(ex:zstruc) in se11 as the structure of the internal table.
    *popluate the data into internal table.
    *in smartform, u declare the internal table as that structure i.e itab type zstruc.
    i.e in smartforms when u declare internal table, u r telling that ur internal table having the structure similar to the structure ZSTRUC.
    In smartforms u can declare the table type using either ...type <db table> or ... type <structure>.
    san

Maybe you are looking for