ORA-6508 while using attached PL-SQL library [SOLVED]

Hi all,
we use Developer 10.1.2.0.2 on Windows XP Professional SP 2.
We have a Linux-based ( 2.6.5-7.287.3) OAS (10.1.2.0.2).
We received ORA-6508 while starting a report from within a menu. In fact all reports led to the same mistake. I must admit that they all worked fine before. We found a workaround for this problem by recompiling the attached PL-SQL library. The question is: what caused the loss of information ? What reasons can be imagined for such a behaviour ?
Regards
Frank
Message was edited by:
fwb

Hi Christian,
what we have is:
We have a .mmx in production for quite a while. Within the .mmx you can start several reports by selecting an entry of the menu. It all works without problems. Then suddenly by choosing one of the reports you face ORA-6508 (something that has never happend before even though we made no changes to the system - at least I have no knowledge of any ;)
The .pll which I recompiled is attached to the menu (.mmb). Recompiling the .pll fixes the issue.
Regards
Frank
Message was edited by:
fwb

Similar Messages

  • FRM-10102: Cannot attach PL/SQL Library menu_library

    Dear All:
    I am using Developer 6i Version 6.0.8.23.2 (32 Bit)
    I am facing following error while opening a form in Forum Builder.
    FRM-10102: Cannot attach PL/SQL Library menu_library. This library attachment will be lost if the module is save.
    I know that I have to add the address of the folder in which the library is located, but I forgot the Registry Key value and location.
    Anyone can help me?
    Thanks
    Hassan

    Yes, I understand that I need to set the FORMS90_PATH in default.env file.
    My question is how do I say "Pick up the library from the same directory as the form fmx".
    Do I have to say it like
    "FORMS90_PATH = C:\MyDir\Forms;" ?
    I was a hesitant to hardcode the directory name( as above) in the default.env file, because incase I change the the library plx directory, I will have to update the envoirnment file again.
    So is there any other way to do it ?

  • Can not attach pl/sql library issue

    Hi,
    While customizing forms,I copied seeded .fmb to my local machine where I installed forms10g - forms builder.I copied related .fmbs and .plls into my local directory i.e c:\forms_files.I checked forms_path in hkey_local_machine and added C:\forms_files to that.
    I'm getting FRM-10102 Can not attach pl/sql library appcore,
    same error for couple of plls :vert,psac,appfldr,appdaypk,faxmad,paxmsg,igilutil etc.
    All those plls are there in my directory?
    Thanks,
    Kiran.

    Please post the details of the application release, database version and OS. Please note that Developer 10g is only certified with R12. If you are on 11i, you need to use Developer 6i
    Please see these docs.
    11i: Error Opening TEMPLATE.fmb in Forms Builder [ID 236803.1]
    How To Customize And Compile An Application Seeded Form (FMB) Or Library (PLL)? [ID 427879.1]
    PDE-PLI038 Cannot Open File For Use As A PL/SQL Library [ID 862614.1]
    Also, see old threads for the same discussion -- https://forums.oracle.com/forums/search.jspa?threadID=&q=FRM-10102&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Cannot attach PL/SQL library APPCORE... forms6i

    Hello,
    I am trying to open the template.fmb form and I cannot seem to get forms to recognize the FORMS60_PATH variable in the registry.
    I transferred (in binary) all the .pll files from $AU_TOP/resource to a local directory ORACLE_HOME\FORMS60\resource.
    I transferred (in binary) TEMPLATE.fmb and APPSTAND.fmb to the same directory.
    I set the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\FORMS60_PATH to 'C:\oracle\ora806\FORMS60\resource' (without the quotes).
    I added HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ORACLE_APPLICATION and set it to 'TRUE'
    I added the FORMS60_PATH to the system variable file in windows to 'c:\oracle\ora806\FORMS60\resource'.
    I rebooted the machine.
    I am still getting the same error message.
    I reinstalled forms so that it was the only Oracle product on my machine.
    version (6.0.8.24.1)
    I am running windows XP SP2
    Can anyone tell me what I am missing? Or why I cannot get the libraries to attach?

    There is a whole list of them that won't attach -
    FRM-10102: Cannot attach PL/SQL library APPCORE. This library attachment will be lost if the module is saved.
    FRM-10102: Cannot attach PL/SQL library APPDAYPK. This library attachment will be lost if the module is saved.
    FRM-10102: Cannot attach PL/SQL library VERT. This library attachment will be lost if the module is saved.
    FRM-10102: Cannot attach PL/SQL library PSAC. This library attachment will be lost if the module is saved.
    FRM-10102: Cannot attach PL/SQL library CUSTOM. This library attachment will be lost if the module is saved.
    FRM-10102: Cannot attach PL/SQL library IGILUTIL. This library attachment will be lost if the module is saved.
    FRM-10102: Cannot attach PL/SQL library IGILUTIL2. This library attachment will be lost if the module is saved.
    FRM-10102: Cannot attach PL/SQL library IGI_CBC. This library attachment will be lost if the module is saved.
    FRM-10102: Cannot attach PL/SQL library APPCORE. This library attachment will be lost if the module is saved.
    --- all Oracle .pll files that are required to modify the template form.... APPDAYPK, APPCORE,VERT, etc. I have not tried attaching (and don't actually have) a personal library
    Message was edited by:
    bonnibelle

  • FRM-10102 Cannot Attach PL/SQL Library : Error

    Hi All,
    We are currently trying to upgrade from Forms6 to Forms10g.
    When we open a Forms6 form in the Forms10g Developer, we are getting the error
    "Cannot Attach PL/SQL Library" error.
    So my question is
    1. What changes do I need to make to the "FORMS90_PATH" envoirnment variable, so that it would look for the library in the current directory ?
    2.Do I need to make this change in the registry or is there any other place where I can make this change ?
    3. I want to make this change without hardcoding the directory name in any place. Is there any way to do it?
    Thanks in advance
    Aruna

    Yes, I understand that I need to set the FORMS90_PATH in default.env file.
    My question is how do I say "Pick up the library from the same directory as the form fmx".
    Do I have to say it like
    "FORMS90_PATH = C:\MyDir\Forms;" ?
    I was a hesitant to hardcode the directory name( as above) in the default.env file, because incase I change the the library plx directory, I will have to update the envoirnment file again.
    So is there any other way to do it ?

  • Cannot attach PL/SQL library APPCORE when opening template.fmb

    Hi,
    we have downloaded all .pll from $AU_TOP/resource directory to local folder and given path in windows registry ie HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/FORMS60_PATH to the local folder in which all pll are kept,
    i have kept all the important fmb in the local folder, APPSTAND.fmb, Template.fmb and every other pll from $AU_TOP/resource, but still i get the cannot attach pl/sql library error when i open template.fmb is something missing.
    Is there something missing, kindly do respond :)
    thanks in anticipaition of early response.
    Abdul Rahman

    Hi erlative,
    Thanks for your message, i just made sure that i have all the pll's only in the forms_60 path and it worked, somehow when i copied all the $AU_TOP/resource apart from APPDAYPK.pll and APPCORE, APPCORE2.pll, it didnt copy all the files, so when i copied all addittional files it worked.
    thanks for your solution.
    have a nice day :)
    Best Regards
    Abdul Rahman

  • ORA-02019 while using DBMS_FILE_TRANSFER Package.

    Hi,
    I am trying to transfer the datafiles from 10.2.0.3 database residing on File-system to 11gR2 database residing on ASM. Both the DBs are on Different machines across datacenters.
    I am trying to use Transportable Tablespace to move the data. As a part of it, I am trying to use DBMS_FILE_TRANSFER package to move the 10gR2 files to 11gR2 ASM.
    I am getting the below issue while doing so:
    SQL> exec sys.DBMS_FILE_TRANSFER.GET_FILE('sdir','data01.dbf','tdir','data01.dbf','RECDB');
    BEGIN sys.DBMS_FILE_TRANSFER.GET_FILE('sdir','data01.dbf','tdir','data01.dbf','RECDB'); END;
    ERROR at line 1:
    ORA-02019: connection description for remote database not found
    ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 37
    ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 132
    ORA-06512: at line 1
    Above SQL was executed from Target Host (11gR2) to GET file from 10gR2. The above directory objects point to correct locations on respective hosts.
    RECDB - it is the DB link which is owned by SYSTEM user and will connect to 10gR2 DB as SYSTEM user.
    Strange thing is when i am querying the source 10gR2 DB from Target DB using Db link, IT is WORKING fine
    SQL> select name from v$database@RECDB ;
    NAME
    POCREC01
    Elapsed: 00:00:00.15
    SQL> select * from dual@RECDB;
    D
    X
    Elapsed: 00:00:00.12
    I also have TNS entry in target tnsnames.ora as:
    POCREC01 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = pocserver.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = pocrec01)
    SQL> create database link RECDB connect to system identified by <password> using 'POCREC01';
    Database link created.
    SQL> select * from all_db_links;
    OWNER
    DB_LINK
    USERNAME
    HOST
    CREATED
    SYSTEM
    RECDB
    SYSTEM
    POCREC01
    05-JAN-11
    So, I want help on whether above issue is a BUG with Package (checked in Metalink and cannot find anything) OR am I doing something wrong??
    Thanks

    Can you please use "create public database link " to create the db link as a PUBLIC link and retry.

  • Open & Attach PL/SQL Library

    I am running Developer 9i on Windows XP home. When I try to open the library calendar90.pll, it gives me an error, ' FRM-10043: cannot open file'. If I try to attach the library to a form, I get the message
    'PDE-PLI038: Can not open file for use as a PL/SQL library'.
    Please Help !

    Do you only get this error with this PLL? Could it be corrupted?
    Has the file been transfered from another system?
    Regards
    Grant Ronald
    Forms Product Management

  • ORA-32036 while using WITH

    I will include the query below my question as it is very long.
    I am using Microsoft SQL Server Reporting Services to connect to an Oracle Database (9i v 2). When I put in the query below I get the following error coming from the Oracle Server -
    "TITLE: Microsoft Report Designer
    An error occurred while executing the query.
    ORA-32036: unsupported case for inlining of query name in WITH clause"
    I found an explanation for this error - "     There is at least one query name which is inlined more than once because it's definition query is too simple and references another query name. This is currently unsupported yet." - and taking out the sub-queries one by one it seems to be COMBINE_TWO sub-query that causes the issue. Apparently it doesn't like the Select * from BLAHBLAH and finds it to be unecessary. I have made this query using nested selects - but the code gets redundant and I end up having to use the same query two or three times....the whole statement takes far too long to execute.
    Any coding suggestions or workaround suggestions would be appreciated - I have been looking at this problem so long that I have tunnel vision. There has to be a fix or a better way...
    Thanks!
    Brett
    Here is the query....
    WITH 
      /*This query finds all pending WO's and caculates all changing service
      levels for limited, basic, internet and phone.  Any values that do not
      change are kept at null, any services being disconnected are dropped to a negative
      and service being upgrades and/or downgraded but still kept are valued
      at their to_quantity value. */
      STEP_1 AS
        SELECT
          WO.ACCOUNT_NUMBER,
          WO.WORK_ORDER_NUMBER,
          WO.WO_TYPE,
          WOD.SERVICE_CODE,
          CASE WHEN WOD.SERVICE_CODE = '101' AND WOD.FROM_QUANTITY != WOD.TO_QUANTITY THEN WOD.TO_QUANTITY - WOD.FROM_QUANTITY ELSE NULL END LIM,
          CASE WHEN WOD.SERVICE_CODE = '111' AND WOD.FROM_QUANTITY != WOD.TO_QUANTITY THEN WOD.TO_QUANTITY - WOD.FROM_QUANTITY ELSE NULL END EXP,
          CASE WHEN WOD.SERVICE_CODE = '30001' AND WOD.FROM_QUANTITY != WOD.TO_QUANTITY THEN WOD.TO_QUANTITY - WOD.FROM_QUANTITY ELSE NULL END HSI,
          CASE WHEN WOD.SERVICE_CODE IN ('LINE FL', 'ULTS FL') AND WOD.FROM_QUANTITY != WOD.TO_QUANTITY THEN WOD.TO_QUANTITY - WOD.FROM_QUANTITY ELSE NULL END PHONE
        FROM
          KAN_WORK_ORDER_MASTER WO INNER JOIN KAN_WORK_ORDER_DETAIL WOD ON WO.WORK_ORDER_NUMBER = WOD.WORK_ORDER_NUMBER
        WHERE
          WO.WO_TYPE IN ('DI', 'DW', 'IN', 'SR', 'UP')
          AND WOD.SERVICE_CODE IN ('101', '111', '30001', 'LINE FL', 'ULTS FL')
          AND POOL = 'A'
          AND WO_STATUS = ' '),
    /* This adds all values from step 1 and condenses all work orders
    into one row, a value for each service. */
    STEP_2 AS
        SELECT
          ACCOUNT_NUMBER,
          WORK_ORDER_NUMBER,
          WO_TYPE,
          SUM(LIM) LIM,
          SUM(EXP) EXP,
          SUM(HSI) HSI,
          SUM(PHONE) PHONE
        FROM
          STEP_1
        GROUP BY
          ACCOUNT_NUMBER,
          WORK_ORDER_NUMBER,
          WO_TYPE
        ORDER BY
          ACCOUNT_NUMBER),
      /* This query takes the results from Step 2 and then looks at all service
      levels that were not included or changed in the work order detail file
      and makes sure that unchanged services are included in the final total.
      FOR EXAMPLE : Coming from step 2, if LIM is NULL we know that no changes
      were done to LIM in the work order - so, if the customer has Limited then
      the service quantity is added to the total.  Else - if LIM is not null, then
      we know the service level was effected by the work order - so do not
      include the quantity from the services file because it will be innacurate
      once the work order is complete*/
      STEP_3 AS
       SELECT
          WO.ACCOUNT_NUMBER,
          WO.WORK_ORDER_NUMBER,
          WO.WO_TYPE,
          CASE WHEN LIM IS NULL AND CS.SERVICE_CODE = '101' THEN (CS.SERVICE_QUANTITY + CS.SERVICE_QUANTITY_TO_FREE) ELSE NULL END LIM,
          CASE WHEN EXP IS NULL AND CS.SERVICE_CODE = '111' THEN (CS.SERVICE_QUANTITY + CS.SERVICE_QUANTITY_TO_FREE) ELSE NULL END EXP,
          CASE WHEN HSI IS NULL AND CS.SERVICE_CODE = '30001' THEN (CS.SERVICE_QUANTITY + CS.SERVICE_QUANTITY_TO_FREE) ELSE NULL END HSI,
          CASE WHEN PHONE IS NULL AND CS.SERVICE_CODE IN ('LINE FL', 'ULTS FL') THEN (CS.SERVICE_QUANTITY + CS.SERVICE_QUANTITY_TO_FREE) ELSE NULL END PHONE
        FROM
          STEP_2 WO INNER JOIN KAN_CUSTOMER_SERVICES CS ON WO.ACCOUNT_NUMBER = CS.ACCOUNT_NUMBER
        WHERE
          CS.SERVICE_CODE IN ('101', '111', '30001', 'LINE FL', 'ULTS FL')
          AND CS.SERVICE_STATUS = 'A'),
      /* This step calculated the current service level. */
      STEP_4 AS
        SELECT
              ACCOUNT_NUMBER,
              WORK_ORDER_NUMBER,
              WO_TYPE,
              SUM(LIM) LIM,
              SUM(EXP) EXP,
              SUM(HSI) HSI,
              SUM(PHONE) PHONE
            FROM
              STEP_3
            GROUP BY
              ACCOUNT_NUMBER,
              WORK_ORDER_NUMBER,
              WO_TYPE
      COMBINE_TWO AS
        SELECT
        FROM
          STEP_2
        UNION ALL
        SELECT
        FROM
          STEP_4
        SELECT
          WOM.SCHEDULE_DATE,
          COMBINE_TWO.ACCOUNT_NUMBER,
          COMBINE_TWO.WORK_ORDER_NUMBER,
          COMBINE_TWO.WO_TYPE,
          HM.ADDRESS_LINE_1,
          HM.ADDRESS_LINE_2,
          HM.ADDRESS_LINE_3,
          HM.ADDRESS_LINE_4,
          SUM(LIM) LIM,
          SUM(EXP) EXP,
          SUM(HSI) HSI,
          SUM(PHONE) PHONE
        FROM
            COMBINE_TWO
            INNER JOIN KAN_CUSTOMER_MASTER CM ON COMBINE_TWO.ACCOUNT_NUMBER = CM.ACCOUNT_NUMBER
            INNER JOIN KAN_HOUSE_MASTER HM ON CM.HOUSE_NUMBER = HM.HOUSE_NUMBER
            INNER JOIN KAN_WORK_ORDER_MASTER WOM ON COMBINE_TWO.WORK_ORDER_NUMBER = WOM.WORK_ORDER_NUMBER
        GROUP BY
          WOM.SCHEDULE_DATE,
          COMBINE_TWO.ACCOUNT_NUMBER,
          COMBINE_TWO.WORK_ORDER_NUMBER,
          COMBINE_TWO.WO_TYPE,
          HM.ADDRESS_LINE_1,
          HM.ADDRESS_LINE_2,
          HM.ADDRESS_LINE_3,
          HM.ADDRESS_LINE_4
        HAVING
            SUM(LIM) <= 0
            AND SUM(EXP) <= 0
          AND
            SUM(HSI) >= 1
            OR SUM(PHONE) >= 1
        ORDER BY
          ACCOUNT_NUMBER

    GREAT job posting and formatting the query. Also helpful was your really good documentation in the query.
    You seem to be approaching your problem in the right way. You are pushing the limits of sql is capable of doing.
    Here are some ideas that you can consider and probably discard; I don't have any good ones but maybe these can encourage you or someone else to think of something better. Sometimes you have to consider and discard bad ideas before getting to the good ones - its part of the process.
    The query is complex enough - how many steps, with unions and subqueries galore - maybe a deconstructed pipelined function would be easier.
    Views aren't usually an answer to problems like this, and more often than not cause other problems later when somebody tries to join to them.
    Deconstructing the query and putting the incremental step data into global temporary tables might work, with a query at the end to read the final result set.

  • Error:frm - 40039 can't attach PL/SQL Library

    Hi All,
    I am new to Oracle forms.While trying to attach plsql library to my forms It is giving me above error.
    I tried google . But not getting solution.
    Please Help.
    Regards,
    SHD
    Edited by: SHD on Jul 1, 2011 6:53 AM

    So I assume it's when you test our of the Builder ....
    go to <developer-home>\forms\server
    ther you find formsweb.cfg and default.env
    if you haven't changed formsweb.cfg, make a security copy of default.env, open default.env in an editor, look form FORMS_PATH= and set your forms-/library-path in front of the other directories (dont forget the separator ';' at the end).
    if you have a changed a formsweb.cfg then may be you are another envFile; look for envFile in formsweb.cfg. If you find something other than default.env note the section (that's that name in '[' ']' above), check if your are using this section; but I rate this propability as rare. Try the above first.

  • Using Oracle OLE DB provider (with ADO) generates error: ORA-01843 while using date

    Were using OLE DB provider in order to connect to our Oracle 9i database. When executing the following query in a SQL Plus window I will get the correct results:
    SELECT gum_seu_syo_id, seu_userid, seu_first_name, seu_last_name
    From group_user_mapping, security_users
    Where gum_seu_syo_id = seu_syo_id
    and gum_term_date > '8/19/2002'
    and gum_seg_syo_id = 11
    However if will execute the same query from the our application (VB using ADO) I will get the following error:
    ORA-01843: Not a valid month
    Checking with our Oracle DBA we made sure my registry is correct and includes the correct format under HEKY_LOCAL_MACHINE\SOFTWARE\ORACLE\ORACLE_HOME,
    where the key is NLS_DATE_FORMAT (of type REG_EXPAND_SZ) with the value:
    MM/DD/YYYY HH:MI:SS AM
    I also run the following query in a SQL Plus window:
    select sysdate from dual;
    and got the following result:
    08/19/2002 10:27:20 AM
    which shows that the data format is correct.
    Trying to switch between the month and day in the query (put '19/8/2002') worked from the application but generated ORA-01843: Not a valid month in the SQL Plus window.
    Any ideas?

    try using
    to_char function
    for eg.
    select * from emp where to_char(hiredate,'dd/mm/yy') > '20/3/83'.
    Jagriti

  • 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>

  • Workaround for ORA-14551 WHILE CALLING FUNCTION IN SQL OVER DBLINK

    Hi,
    any idea how to workaround such issue in 9.2.0.8 (I know this is working with 11.2).
    create table mylog(id number, data date , mess clob);
    create or replace function myfunc(id in number, data in date ,mess in varchar2)
    return number is
    pragma autonomous_transaction;
    retval number;
    begin
       insert into mylog values (id , data ,mess);
    commit;
    retval := id;
    return retval;
    end;
    SQL> select schema.myfunc@dblink(2,sysdate,'bbbbbbb') from dual;
    ERROR at line 1:
    ORA-14551: cannot perform a DML operation inside a query
    ORA-06512: at "SCHEMA.MYFUNC", line 6
    ORA-06512: at line 1Regards
    GregG

    DBMS_SQL is documented in what I think 9i calls "Supplied Oracle Packages and Types" manual.
    The basic concept behind this is that it allows you to manually create a cursor and execute it (via an OCI like interface). For example, it can be used to issue remote DDLs via a database link as described in {message:id=10323373}.
    DBMS_SQL provides flexibility and power that is beyond the standard cursor constructs in PL/SQL. The system package version even enables you to execute SQL and PL/SQL code as any other schema in the database.
    You will have however to play around with DBMS_SQL (locally and remotely) to determine how to hide the fact that a local select (which Oracle assumes, correctly, does not change database state), actually changes the state of a remote database.
    Personally I would not bother with such a hack. I would use the problem to enforce an upgrade to the latest Oracle version, or kick out the crappy app that needs to use a SQL select to make database changes.

  • 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>

  • ORA-06550 - while compiling the PL/SQL block.

    I am trying a to populate a table based on the below pl/sql block
    Declare
    temp source.source%type;
    tregion varchar2(40);
    tversion varchar2(40);
    tsource varchar2(100);
    Cursor c1 is
    Select * from Source;
    Begin
    Open c1;
    Loop
    fetch c1 into temp;
    select REGION, VERSION, SOURCE into tregion, tversion, tsource from QUOTE_LETTERS_MASTER where SOURCE = temp AND REGION = 'eSource';
    insert into esource values(tregion, tversion, tsource);
    Exception
    when no_data_found then
    insert into esource values('No eSource',' ',temp.source);
    exit when c1%notfound;
    End Loop;
    close c1;
    end;

    yes, there are more than one rows that is returned when i do a Select Into statement.
    I am trying to resolve by using a cursor C2 inside the already existing cursor C1, i will use a inner loop to get the select statement value to cursor c2 then i will assign the vlaues the variables, then once i read all the values of cursor c2 i will exit inner loop and go to outer loop to read the next value of c1 and then again go to cursor c2 and inner loop.
    Do you think it will work ?
    Thank you,
    rakesh
    I have pasted the code below.
    Declare
    temp1 source.source%type;
    temp2 QUOTE_LETTERS_MASTER%rowtype;
    Cursor c1 is
    Select * from Source;
    Begin
    open c1;
    loop
    fetch c1 into temp;
    cursor c2 is
    select region, version, source from QUOTE_LETTERS_MASTER where SOURCE = temp AND REGION = 'eSource';
    open c2;
    loop
    begin
    fetch c2 into temp2;
    insert into esource values(temp2.region, temp2.version, temp2.source);
    Exception
    when no_data_found then
    insert into esource values('No esource',' ',temp);
    exit when c2%notfound;
    end loop;
    close c2;
    exit when c1%notfound;
    end loop;
    close c1;
    end;
    But is giving this error : - ORA-06550: line 10, column 13:
    ***PLS-00103: Encountered the symbol "C2" when expecting one of the following:
    ***:= . ( @ % ;
    ***1. Declare***
    ***2. temp1 source.source%type;
    ***3. temp2 QUOTE_LETTERS_MASTER%rowtype;
    Edited by: rakesh119 on Apr 10, 2013 11:08 AM

Maybe you are looking for

  • Can I use one transport adapter on the nodes of the cluster?

    Hi I am new to sun cluster, in the cluster documentation they mentioned that each node should have 2 network cards one for public connections and one for private connection. what if I do not want the nodes to have public connections except for one no

  • Does the iphone 5 comes unlock?

    I wanna know if I can use my iPhone 5 with another carrier outside the country

  • WebService dataControls

    Hi, in model i create WEbServiceDataControl. On local i use ip like 195....... But when i deploy ma app on server - webServices must call from 172.... ip. My problem: i cant change ip for my dataControls. It work great on local or on server, i just w

  • No progressive download for H.264?

    I was encoding a 6 minute video for web delivery in H.264 and it appeared that there is no provision for encoding for Fast Start or other setting to allow progressive download.  The 6 minute video compressed in H.264 to about 30MB and was only downlo

  • R12: "FRM-92101:There was a failure in the Forms Server during startup"

    LINUX VERSION: [oracle@USSLTC3118V StageR12]$ cat /etc/*-release Red Hat Enterprise Linux Server release 5.4 (Tikanga) LOGS: $/ebs/oracle/VIS/inst/apps/VIS_ussltc3118v/logs/ora/10.1.3/j2ee/forms/forms_default_group_1/application.log: 12/06/07 08:55:1