How to update schema-base xmltype by dba?error ORA-19007

Hi ,
Connect to db using user 'u1', register schema to LOCAL and update schema-base xmltype success. Then I login in db as dba, update xmltype occus ORA-19007. If I register the schema to GLOBAL, using dba to update xmltype has no problem. But how to update schema-base xmltype who's schema is register as LOCAL by dba?
connect to db using user ‘U1’:
declare
begin
dbms_xmlschema.registerSchema(
'http://www.oradev.com/myschetest.xsd',
'<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.oradev.com/myschetest.xsd"
xmlns:sch="http://www.oradev.com/myschetest.xsd"
version="1.0" elementFormDefault="qualified">
<element name = "Employee">
<complexType>
<sequence>
<element name = "EmployeeId" type = "positiveInteger"/>
<element name = "FirstName" type = "string"/>
<element name = "LastName" type = "string"/>
<element name = "Salary" type = "positiveInteger"/>
</sequence>
</complexType>
</element>
</schema>',TRUE, TRUE, FALSE, FALSE);
end;
SCHEMA register as LOCAL.
create table globtest(id number, content sys.xmltype)XMLTYPE content STORE AS OBJECT RELATIONAL XMLSCHEMA "http://www.oradev.com/myschetest.xsd" ELEMENT "Employee";
It's OK.
insert into globtest values(1, sys.XMLType.createXML('<Employee xmlns="http://www.oradev.com/myschetest.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oradev.com/myschetest.xsd http://www.oradev.com/myschetest.xsd"><EmployeeId>1234</EmployeeId><FirstName>Ravi</FirstName><LastName>Murthy</LastName><Salary>100</Salary></Employee>'));
It's OK.
update U1.globtest set content = sys.XMLType.createXML('<Employee xmlns="http://www.oradev.com/myschetest.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oradev.com/myschetest.xsd http://www.oradev.com/myschetest.xsd"><EmployeeId>1234</EmployeeId><FirstName>'||unistr('\0080\0081')||unistr('\0085')||'Ravi</FirstName><LastName>Murthy</LastName><Salary>100</Salary></Employee>') where id=1;
It's OK.
but when i login in as dba,
using above update sql. It has probleam.ORA-19007.
How can i using dba to update this LOCAL schema-base xmltype? Thanks a lot.

User 'U1' is created by:
create user u1 identified by u1;
grant dba to u1;
Is there any other privilege need to be grant to u1?

Similar Messages

  • How to update schema passwords in the RPD ????

    Hi All,
           Please, does someone may explain me how to perfom the steps below ?  Because I am changing the password from BI Applications components.
    7.2.3.1. Oracle BI Application Configuration physical connection. Update the password on each the 2 connection pools:
    •Oracle BI Application Configuration Connection Pool
    •Oracle BI Application Configuration Initblocks Connection Pool
    7.2.3.2. Oracle Data Warehouse physical connection. Update the password on each the 2 connection pools. This is the updated password for the <prefix>_DW schema.
    •Oracle Data Warehouse Connection Pool
    •Oracle Data Warehouse Repository InitBlocks Connection Pool
       I mean, where do i find these connection Pool ?
    Thanks in advance.

    you need to download the admin tool Oracle Business Intelligence 11g Downloads
    Oracle Business Intelligence Developer Client Tools Installer (11.1.1.7.0)
      for Microsoft Windows x86 (32-bit): (182M) (cksum 1549113500)
      for Microsoft Windows x86 (64-bit): (204M) (cksum 3535381166)

  • JDev 11g update 1 base edition on windows: error building default domain

    Hi all,
    (refer to [url http://forums.oracle.com/forums/thread.jspa?messageID=3168105]here for original post)
    I'm posting this again with some more information. When downloading the Studio Edition (Base - no JDK) version of JDeveloper 11g update 1, an error occurs upon first (and each subsequent) startup of JDeveloper (error details below).
    Tests that I have done:
    1). Install using JDK 6 u 11 - JDK did not show up automatically in the installer, had to browse to find it and select it. Running using 6u11, 6u10, and 6u7 (deleting the system directory after each try) - error occurs.
    2). Install using JDK 6 u7 - JDK was automatically found by the installer. Running using 6u7, 6u11, and 6u10 (deleting the system directory after each try) - error occurs
    These errors do not occur when using the Windows installer. For information: my machine is Windows 2008 Server Standard 32-bit. An update - I just tried this on a Vista 64-bit laptop (running Sun 32-bit JDK 6u10) and did not have the problem. Ergo, this seems to be an issue with the JDK and detecting Windows 2008 as a Windows platform (or possibly with whatever mechanism JDev/WLS is using to detect the OS platform). I'll do more research on that and update if I find anything.
    One more update: I didn't find any issues reported like this related to Windows 2008, but I did one more test: install and run JDeveloper using:
    java version "1.6.0_05"                                                        
    Java(TM) SE Runtime Environment (build 1.6.0_05-b13)                           
    BEA JRockit(R) (build R27.6.0-50_o-100423-1.6.0_05-20080626-2105-windows-ia32, compiled mode)                                                                   The issue does not occur using this JDK. So to summarize, installing JDev 11g update 1 Studio edition, base installer using any of the SUN JDK's on Windows 2008 gives this problem. Using the windows installer or JRockit Mission Control JVM - no problems.
    Finally, one last update - the error is related to the JVM that is used to install, not the one used to run JDeveloper (via editing jdev.conf) - the offending JDK is in wlserver_10.3\common\bin\commEnv.cmd. Seems like a no-no to have one JDK running JDev and another running the integrated WLS, though. Quite a pity, as JDev starts up pretty slowly using JRockit Mission Control.
    JRockit Realtime seems to be a bit faster... sigh - now to remove the 72 extra JDK's on my laptop ;)
    My going forward plan: use the Windows installer. Wish I never installed Windows Server 2008.
    Now for the error details; the log shows:
    ERROR:  An error occurred while building the default domain.
    Please see this log file for more details:
    C:\o\jdev11\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee.adrs\CreateDefaultDomain.logThe aforementioned log file shows:
    Default domain will be created:
    C:\o\jdev11\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain
    C:\o\jdev11\wlserver_10.3\common\bin\wlst.cmd "C:\o\jdev11\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee.adrs\CreateDefaultDomain.py"
    Process started
    wlst >
    wlst > CLASSPATH=c:\o\jdev11\patch_wls1030\profiles\default\sys_manifest_classpath\weblogic_patch.jar;c:\o\jdev11\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;c:\o\jdev11\patch_cie660\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Java\JDK16~1.0_1\lib\tools.jar;C:\o\jdev11\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\o\jdev11\WLSERV~1.3\server\lib\weblogic.jar;c:\o\jdev11\modules\features\weblogic.server.modules_10.3.0.0.jar;C:\o\jdev11\WLSERV~1.3\server\lib\webservices.jar;c:\o\jdev11\modules\ORGAPA~1.5/lib/ant-all.jar;c:\o\jdev11\modules\NETSFA~1.0_1/lib/ant-contrib.jar;
    wlst >
    wlst > PATH=c:\o\jdev11\patch_wls1030\profiles\default\native;c:\o\jdev11\patch_jdev1111\profiles\default\native;c:\o\jdev11\patch_cie660\profiles\default\native;C:\o\jdev11\WLSERV~1.3\server\native\win\32;C:\o\jdev11\WLSERV~1.3\server\bin;c:\o\jdev11\modules\ORGAPA~1.5\bin;C:\Java\JDK16~1.0_1\jre\bin;C:\Java\JDK16~1.0_1\bin;c:\o\db11\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Subversion\bin;c:\o\wfc\bin;c:\o\wfc\jre\1.4.2\bin\client;c:\o\wfc\jre\1.4.2\bin;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;c:\o\odp;c:\o\odp\bin;c:\java\apache-ant-1.7.1\bin;C:\Program Files\Plazmic CDK 4.6\bin;c:\o\db11\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Subversion\bin;c:\o\wfc\bin;c:\o\wfc\jre\1.4.2\bin\client;c:\o\wfc\jre\1.4.2\bin;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;c:\o\odp;c:\o\odp\bin;C:\o\jdev11\WLSERV~1.3\server\native\win\32\oci920_8
    wlst >
    wlst > Your environment has been set.
    wlst >
    wlst > CLASSPATH=c:\o\jdev11\patch_wls1030\profiles\default\sys_manifest_classpath\weblogic_patch.jar;c:\o\jdev11\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;c:\o\jdev11\patch_cie660\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Java\JDK16~1.0_1\lib\tools.jar;C:\o\jdev11\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\o\jdev11\WLSERV~1.3\server\lib\weblogic.jar;c:\o\jdev11\modules\features\weblogic.server.modules_10.3.0.0.jar;C:\o\jdev11\WLSERV~1.3\server\lib\webservices.jar;c:\o\jdev11\modules\ORGAPA~1.5/lib/ant-all.jar;c:\o\jdev11\modules\NETSFA~1.0_1/lib/ant-contrib.jar;;C:\o\jdev11\WLSERV~1.3\common\eval\pointbase\lib\pbembedded57.jar;C:\o\jdev11\WLSERV~1.3\common\eval\pointbase\lib\pbtools57.jar;C:\o\jdev11\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar
    wlst >
    wlst > Initializing WebLogic Scripting Tool (WLST) ...
    wlst >
    wlst > Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.
    wlst >
    wlst > Welcome to WebLogic Server Administration Scripting Shell
    wlst >
    wlst > Type help() for help on available commands
    wlst >
    wlst > Creating Default Domain
    wlst > Reading template: /C:/o/jdev11/wlserver_10.3/common/templates/domains/wls.jar
    wlst > Setting Name to 'DefaultServer'
    wlst > Setting ListenAddress to ''
    wlst > Setting ListenPort to 7101
    wlst > Setting domain password.
    wlst > Failed to get environment, environ will be empty: (0, 'Failed to execute command ([\'sh\', \'-c\', \'env\']): java.io.IOException: Cannot run program "sh": CreateProcess error=2, The system cannot find the file specified')
    wlst > Problem invoking WLST - Traceback (innermost last):
    wlst >   File "C:\o\jdev11\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee.adrs\CreateDefaultDomain.py", line 50, in ?
    wlst >   File "Lib/javaos.py", line 137, in __getitem__
    wlst >   File "Lib/UserDict.py", line 14, in __getitem__
    wlst > KeyError: DOMAIN_PASSWORD
    wlst >
    Elapsed time:  40920 msAs noted in the original post - it seems that the WebLogic scripting tool is assuming a Unix-type host.
    Best,
    John

    Hi all,
    (refer to [url http://forums.oracle.com/forums/thread.jspa?messageID=3168105]here for original post)
    I'm posting this again with some more information. When downloading the Studio Edition (Base - no JDK) version of JDeveloper 11g update 1, an error occurs upon first (and each subsequent) startup of JDeveloper (error details below).
    Tests that I have done:
    1). Install using JDK 6 u 11 - JDK did not show up automatically in the installer, had to browse to find it and select it. Running using 6u11, 6u10, and 6u7 (deleting the system directory after each try) - error occurs.
    2). Install using JDK 6 u7 - JDK was automatically found by the installer. Running using 6u7, 6u11, and 6u10 (deleting the system directory after each try) - error occurs
    These errors do not occur when using the Windows installer. For information: my machine is Windows 2008 Server Standard 32-bit. An update - I just tried this on a Vista 64-bit laptop (running Sun 32-bit JDK 6u10) and did not have the problem. Ergo, this seems to be an issue with the JDK and detecting Windows 2008 as a Windows platform (or possibly with whatever mechanism JDev/WLS is using to detect the OS platform). I'll do more research on that and update if I find anything.
    One more update: I didn't find any issues reported like this related to Windows 2008, but I did one more test: install and run JDeveloper using:
    java version "1.6.0_05"                                                        
    Java(TM) SE Runtime Environment (build 1.6.0_05-b13)                           
    BEA JRockit(R) (build R27.6.0-50_o-100423-1.6.0_05-20080626-2105-windows-ia32, compiled mode)                                                                   The issue does not occur using this JDK. So to summarize, installing JDev 11g update 1 Studio edition, base installer using any of the SUN JDK's on Windows 2008 gives this problem. Using the windows installer or JRockit Mission Control JVM - no problems.
    Finally, one last update - the error is related to the JVM that is used to install, not the one used to run JDeveloper (via editing jdev.conf) - the offending JDK is in wlserver_10.3\common\bin\commEnv.cmd. Seems like a no-no to have one JDK running JDev and another running the integrated WLS, though. Quite a pity, as JDev starts up pretty slowly using JRockit Mission Control.
    JRockit Realtime seems to be a bit faster... sigh - now to remove the 72 extra JDK's on my laptop ;)
    My going forward plan: use the Windows installer. Wish I never installed Windows Server 2008.
    Now for the error details; the log shows:
    ERROR:  An error occurred while building the default domain.
    Please see this log file for more details:
    C:\o\jdev11\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee.adrs\CreateDefaultDomain.logThe aforementioned log file shows:
    Default domain will be created:
    C:\o\jdev11\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain
    C:\o\jdev11\wlserver_10.3\common\bin\wlst.cmd "C:\o\jdev11\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee.adrs\CreateDefaultDomain.py"
    Process started
    wlst >
    wlst > CLASSPATH=c:\o\jdev11\patch_wls1030\profiles\default\sys_manifest_classpath\weblogic_patch.jar;c:\o\jdev11\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;c:\o\jdev11\patch_cie660\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Java\JDK16~1.0_1\lib\tools.jar;C:\o\jdev11\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\o\jdev11\WLSERV~1.3\server\lib\weblogic.jar;c:\o\jdev11\modules\features\weblogic.server.modules_10.3.0.0.jar;C:\o\jdev11\WLSERV~1.3\server\lib\webservices.jar;c:\o\jdev11\modules\ORGAPA~1.5/lib/ant-all.jar;c:\o\jdev11\modules\NETSFA~1.0_1/lib/ant-contrib.jar;
    wlst >
    wlst > PATH=c:\o\jdev11\patch_wls1030\profiles\default\native;c:\o\jdev11\patch_jdev1111\profiles\default\native;c:\o\jdev11\patch_cie660\profiles\default\native;C:\o\jdev11\WLSERV~1.3\server\native\win\32;C:\o\jdev11\WLSERV~1.3\server\bin;c:\o\jdev11\modules\ORGAPA~1.5\bin;C:\Java\JDK16~1.0_1\jre\bin;C:\Java\JDK16~1.0_1\bin;c:\o\db11\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Subversion\bin;c:\o\wfc\bin;c:\o\wfc\jre\1.4.2\bin\client;c:\o\wfc\jre\1.4.2\bin;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;c:\o\odp;c:\o\odp\bin;c:\java\apache-ant-1.7.1\bin;C:\Program Files\Plazmic CDK 4.6\bin;c:\o\db11\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Subversion\bin;c:\o\wfc\bin;c:\o\wfc\jre\1.4.2\bin\client;c:\o\wfc\jre\1.4.2\bin;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;c:\o\odp;c:\o\odp\bin;C:\o\jdev11\WLSERV~1.3\server\native\win\32\oci920_8
    wlst >
    wlst > Your environment has been set.
    wlst >
    wlst > CLASSPATH=c:\o\jdev11\patch_wls1030\profiles\default\sys_manifest_classpath\weblogic_patch.jar;c:\o\jdev11\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;c:\o\jdev11\patch_cie660\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Java\JDK16~1.0_1\lib\tools.jar;C:\o\jdev11\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\o\jdev11\WLSERV~1.3\server\lib\weblogic.jar;c:\o\jdev11\modules\features\weblogic.server.modules_10.3.0.0.jar;C:\o\jdev11\WLSERV~1.3\server\lib\webservices.jar;c:\o\jdev11\modules\ORGAPA~1.5/lib/ant-all.jar;c:\o\jdev11\modules\NETSFA~1.0_1/lib/ant-contrib.jar;;C:\o\jdev11\WLSERV~1.3\common\eval\pointbase\lib\pbembedded57.jar;C:\o\jdev11\WLSERV~1.3\common\eval\pointbase\lib\pbtools57.jar;C:\o\jdev11\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar
    wlst >
    wlst > Initializing WebLogic Scripting Tool (WLST) ...
    wlst >
    wlst > Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.
    wlst >
    wlst > Welcome to WebLogic Server Administration Scripting Shell
    wlst >
    wlst > Type help() for help on available commands
    wlst >
    wlst > Creating Default Domain
    wlst > Reading template: /C:/o/jdev11/wlserver_10.3/common/templates/domains/wls.jar
    wlst > Setting Name to 'DefaultServer'
    wlst > Setting ListenAddress to ''
    wlst > Setting ListenPort to 7101
    wlst > Setting domain password.
    wlst > Failed to get environment, environ will be empty: (0, 'Failed to execute command ([\'sh\', \'-c\', \'env\']): java.io.IOException: Cannot run program "sh": CreateProcess error=2, The system cannot find the file specified')
    wlst > Problem invoking WLST - Traceback (innermost last):
    wlst >   File "C:\o\jdev11\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee.adrs\CreateDefaultDomain.py", line 50, in ?
    wlst >   File "Lib/javaos.py", line 137, in __getitem__
    wlst >   File "Lib/UserDict.py", line 14, in __getitem__
    wlst > KeyError: DOMAIN_PASSWORD
    wlst >
    Elapsed time:  40920 msAs noted in the original post - it seems that the WebLogic scripting tool is assuming a Unix-type host.
    Best,
    John

  • How to Update an XML schema..

    Hi All,
    I am new to XML concept. I have a requirement to create a xml schema which will be updated on a weekly basis and a table which associated to the created xml schema.. when ever the Schema is updated the table should not get affected.. Is there a way to solve my problem.. Kindly help me.
    I am using the following client:
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 31 11:44:59 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ////////////////////////////////// XML Schema ///////////////////////
    begin
    dbms_xmlschema.registerSchema(
    'http://www.oradev.com/chipsxml1.xsd',
    '<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oradev.com/chipsxml1.xsd"
    xmlns:samp="http://www.oradev.com/chipsxml1.xsd"
    version="1.0">
    <element name="HICC">
    <complexType>
    <sequence>
         <element name="UTI">
              <complexType>
              <sequence>
              <element name = "U01" type = "string"/>
              <element name = "U02" type = "string"/>
              <element name = "U03" type = "string"/>
              <element name = "U03a" type = "string"/>
              <element name = "U03b" type = "string"/>
              <element name = "U03c" type = "string"/>          
              <element name = "U04" type = "string"/>                    
              <element name = "U05" type = "string"/>                    
              </sequence>
              </complexType>
         </element>
         <element name="SSI">
              <complexType>
              <sequence>
              <element name = "S01" type = "string"/>
              <element name = "S02" type = "string"/>
              <element name = "S02A" type = "string"/>
              <element name = "S02B" type = "string"/>
              <element name = "S02C" type = "string"/>          
              </sequence>
              </complexType>
         </element>
    </sequence>
    </complexType>
    </element>
    </schema>',
    TRUE, TRUE, FALSE, FALSE);
    end;
    ////////////////////////// Table which has multiple Column //////////////////////////
    CREATE TABLE chipsxmltable2 (
    id number, HICCXMLDATA XmlType)
    XMLTYPE HICCXMLDATA STORE AS OBJECT RELATIONAL
    XMLSCHEMA "http://www.oradev.com/chipsxml1.xsd"
    ELEMENT "HICC";
    ///////////////////////////////// Insert Query in chipsxmltable //////////////////////////
    INSERT INTO chipsxmltable2 VALUES(1,
    xmltype.createxml('<?xml version="1.0"?>
    <samp:HICC xmlns:samp="http://www.oradev.com/chipsxml1.xsd" >
    <UTI>
    <U01>No</U01>
    <U02>Y</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>     
    <U04>Y</U04>
    <U05>Y</U05>          
    </UTI>
    <SSI>
    <S01>No</S01>
    <S02>Y</S02>
    <S02A>Y</S02A>
    <S02B>Y</S02B>
    <S02C>Y</S02C>
    </SSI>
    </samp:HICC>'));
    //////// This is my Revised XML Schema ///////////////////////
    begin
    dbms_xmlschema.registerSchema(
    'http://www.oradev.com/Rchipsxml1.xsd',
    '<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oradev.com/Rchipsxml1.xsd"
    xmlns:samp="http://www.oradev.com/Rchipsxml1.xsd"
    version="1.0">
    <element name="HICC">
    <complexType>
    <sequence>
         <element name="UTI">
              <complexType>
              <sequence>
              <element name = "U01" type = "string"/>
              <element name = "U02" type = "string"/>
              <element name = "U03" type = "string"/>
              <element name = "U03a" type = "string"/>
              <element name = "U03b" type = "string"/>
              <element name = "U03c" type = "string"/>          
              <element name = "U04" type = "string"/>                    
              <element name = "U05" type = "string"/>                    
              </sequence>
              </complexType>
         </element>
    </sequence>
    </complexType>
    </element>
    </schema>',
    TRUE, TRUE, FALSE, FALSE);
    end;
    My question is:
    How to update schema without affecting my table and the data which has already in the table?
    Apologies if the description is not clear. Kindly let me know if further details are needed. Many thanks for your help.
    Very best regards,
    Godwin Jebakumar C.V.
    Thanks in advance,
    Godwin Jebakumar

    Duplicate thread : {thread:id=2171878}
    Please mark this one as "answered".

  • Still ORA-19007: Schema and element do not match Error

    Hi all,
    I'm new to XML and dealing with lots of information but I'm stuck with this error ORA-19007: Schema and element do not match. Read some forums and tried some possibitlities but none has solved this issue. I think this is related with some malformed headers definitions but I'm not sure, so any help will be much appreciated.
    Here's what I've done so far:
    This is the xml file - emp.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2006 rel. 3 sp2 (http://www.altova.com)-->
    <employees xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/xdb/emp.xsd">
         <employee team="Team Test">
              <id>1</id>
              <name>Nelson Branco</name>
              <comment>No Comments</comment>
         </employee>
    </employees>
    ...and this is the XSD file: emp.xsd:
    <?xml version="1.0" encoding="ISO-8859-15"?>
    <!-- edited with XMLSpy v2006 rel. 3 sp2 (http://www.altova.com) by Nelson Branco (Oracle Corp) -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" xdb:storeVarrayAsTable="true">
         <xs:element name="comment" type="xs:string"/>
         <xs:element name="id" type="xs:string"/>
         <xs:element name="name" type="xs:string"/>
         <xs:complexType name="employeeType">
              <xs:sequence>
                   <xs:element ref="id"/>
                   <xs:element ref="name"/>
                   <xs:element ref="comment" minOccurs="0"/>
              </xs:sequence>
              <xs:attribute name="team" type="xs:string" use="optional"/>
         </xs:complexType>
         <xs:element name="employee" type="employeeType"/>
         <xs:element name="employees" xdb:defaultTable="EMPLOYEES">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="employee" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    1) Created folders
    declare
    ignore boolean;
    begin
    ignore := dbms_xdb.createFolder('/public/Emp');
    ignore := dbms_xdb.createFolder('/public/Emp/xsd');
    ignore := dbms_xdb.createFolder('/public/Emp/xml');
    commit ;
    end;
    2) Copied emp.xsd to /public/Emp/xsd in Win Explorer (via WebDAV connection)
    3) Registered the schema
    begin
    dbms_xmlschema.registerURI(schemaURL => 'http://xmlns.oracle.com/xdb/emp.xsd'
    ,schemaDocURI => '/public/Emp/xsd/emp.xsd'
    ,genTables => true
    commit ;
    end ;
    4) Copied the xml file to /public/Emp/xml. At this point I was expecting that the xml file was automatically uploaded to corresponding tables based on is content but it didn't happen. I didn't got any error also. When I issue:
    Select count(*) from employees
    ...or
    select y."name", y."team" from employees x, table(x.xmldata."employee") y
    ...got 0 rows returned
    5) So then created the table:
    create table emp_tab(
    id number,
    emp sys.XMLType
    xmltype column emp
    XMLSCHEMA "http://xmlns.oracle.com/xdb/emp.xsd"
    element "employee";
    6) And tried to insert one record based on the emp.xml:
    insert into emp_tab values (1,
    xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2006 rel. 3 sp2 (http://www.altova.com)-->
    <employees xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/xdb/emp.xsd">
         <employee team="Team Test">
              <id>1</id>
              <name>Nelson Branco</name>
              <comment>No Comments</comment>
         </employee>
    </employees>'));
    ...and that when I get ORA-19007: Schema and element do not match.
    Any help on this will be appreciated. Thx.

    SQL> set echo on
    SQL> spool testcase.log
    SQL> --
    SQL> connect sys/ as sysdba
    Enter password:
    Connected.
    SQL> set define on
    SQL> --
    SQL> define USERNAME = OTNTEST
    SQL> --
    SQL> def PASSWORD = OTNTEST
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user OTNTEST cascade
    User dropped.
    SQL> grant connect, resource to &USERNAME identified by &PASSWORD
      2  /
    old   1: grant connect, resource to &USERNAME identified by &PASSWORD
    new   1: grant connect, resource to OTNTEST identified by OTNTEST
    Grant succeeded.
    SQL> grant create any directory, drop any directory to &USERNAME
      2  /
    old   1: grant create any directory, drop any directory to &USERNAME
    new   1: grant create any directory, drop any directory to OTNTEST
    Grant succeeded.
    SQL> grant alter session, create view to &USERNAME
      2  /
    old   1: grant alter session, create view to &USERNAME
    new   1: grant alter session, create view to OTNTEST
    Grant succeeded.
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user OTNTEST default tablespace USERS temporary tablespace TEMP
    User altered.
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> alter session set events ='19027 trace name context forever, level 0x800'
      2  /
    Session altered.
    SQL> var schemaURL varchar2(256)
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'http://xmlns.oracle.com/xdb/emp.xsd';
      3    :schemaPath := '/public/testcase.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> create or replace directory XMLDIR as 'c:\xdb\otn'
      2  /
    Directory created.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<?xml version="1.0" encoding="ISO-8859-15"?>
      5  <!-- edited with XMLSpy v2006 rel. 3 sp2 (http://www.altova.com) by Nelson Branco (Oracle Corp) -->
      6  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" xdb:store
    VarrayAsTable="true">
      7  <xs:element name="comment" type="xs:string"/>
      8  <xs:element name="id" type="xs:string"/>
      9  <xs:element name="name" type="xs:string"/>
    10  <xs:complexType name="employeeType">
    11  <xs:sequence>
    12  <xs:element ref="id"/>
    13  <xs:element ref="name"/>
    14  <xs:element ref="comment" minOccurs="0"/>
    15  </xs:sequence>
    16  <xs:attribute name="team" type="xs:string" use="optional"/>
    17  </xs:complexType>
    18  <xs:element name="employee" type="employeeType"/>
    19  <xs:element name="employees" xdb:defaultTable="EMPLOYEES">
    20  <xs:complexType>
    21  <xs:sequence>
    22  <xs:element ref="employee" maxOccurs="unbounded"/>
    23  </xs:sequence>
    24  </xs:complexType>
    25  </xs:element>
    26  </xs:schema>');
    27  begin
    28    if (dbms_xdb.existsResource(:schemaPath)) then
    29      dbms_xdb.deleteResource(:schemaPath);
    30    end if;
    31    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    32  end;
    33  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      TRUE,TRUE,FALSE,TRUE
      7    );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> var xmltext varchar2(4000)
    SQL> --
    SQL> begin
      2    :xmltext :=
      3  '<?xml version="1.0" encoding="UTF-8"?>
      4  <!--Sample XML file generated by XMLSpy v2006 rel. 3 sp2 (http://www.altova.com)-->
      5  <employees xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=
    "http://xmlns.oracle.com/xdb/emp.xsd">
      6  <employee team="Team Test">
      7  <id>1</id>
      8  <name>Nelson Branco</name>
      9  <comment>No Comments</comment>
    10  </employee>
    11  </employees>';
    12  end;
    13  /
    PL/SQL procedure successfully completed.
    SQL> insert into EMPLOYEES values ( xmltype(:xmltext));
    1 row created.
    SQL> /
    1 row created.
    SQL> create table emp_tab
      2  (
      3     id number,
      4     emp sys.XMLType
      5  )
      6  xmltype column emp
      7  XMLSCHEMA "http://xmlns.oracle.com/xdb/emp.xsd"
      8  element "employee"
      9  /
    Table created.
    SQL> insert into EMP_TAB values ( 1, xmltype(:xmltext))
      2  /
    insert into EMP_TAB values ( 1, xmltype(:xmltext))
    ERROR at line 1:
    ORA-19040: Element employees does not match expected employee.
    SQL> drop table emp_tab
      2  /
    Table dropped.
    SQL> create table emp_tab
      2  (
      3     id number,
      4     emp sys.XMLType
      5  )
      6  xmltype column emp
      7  XMLSCHEMA "http://xmlns.oracle.com/xdb/emp.xsd"
      8  element "employees"
      9  /
    Table created.
    SQL> insert into EMP_TAB values ( 1, xmltype(:xmltext))
      2  /
    1 row created.
    SQL>

  • How to know exact column name in following error (oracle9i)

    Hi all,
    Please telll me
    How to know exact column name in following error
    ORA-01401: inserted value too large for column
    Prashant
    null

    If you are running this in your SQL*Plus session then you can easily check it out --
    satyaki>
    satyaki>create table test_sat
      2     as
      3    select empno,ename,job
      4    from emp;
    Table created.
    satyaki>
    satyaki>
    satyaki>desc test_sat;
    Name                                      Null?    Type
    EMPNO                                              NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    satyaki>
    satyaki>
    satyaki>
    satyaki>
    satyaki>insert into test_sat values(5555,'Robin','BU');
    1 row created.
    satyaki>
    satyaki>
    satyaki>insert into test_sat values(5555,'Arama Baager Taaja','FR');
    insert into test_sat values(5555,'Arama Baager Taaja','FR')
    ERROR at line 1:
    ORA-01401: inserted value too large for column
    satyaki>insert into test_sat values(55557,'Arama','FR');
    insert into test_sat values(55557,'Arama','FR')
    ERROR at line 1:
    ORA-01438: value larger than specified precision allows for this column
    satyaki>
    satyaki>insert into test_sat values(5555,'Arama','ACCOUNTING');
    insert into test_sat values(5555,'Arama','ACCOUNTING')
    ERROR at line 1:
    ORA-01401: inserted value too large for column
    satyaki>Regards.
    Satyaki De.

  • How do you upload firmware to Airport extreme with the following message: This version of AirPort Utility requires this AirPort Extreme use firmware version 7.3.1 or later. Use AirPort Utility 5.6 to update this base station. I'm using airport utility 6.0

    The airport extreme at my parent's house has not had its firmware update in some time and it keeps dropping the internet connection and needing to be reset.
    I went to update firmware and opened up airport utilities (I'm running airport 6.0 on Mountain Lion, 10.7.4).  Everytime I open the airport utility I get the following message: "
    This version of AirPort Utility requires this AirPort Extreme use firmware version 7.3.1 or later. Use AirPort Utility 5.6 to update this base station. AirPort Utility 5.6 is available at AirPort Service and Support.
    I've followed the link and tried to update firmwares but none are available and the print says that airport utility will look to see if firmware are available and load them as necessary when prompted by user.
    One link said the only way to solve this problem is open up Airport Utility 5.6. I tried to do this, but 5.6 is not supported on Mountain Lion and couldn't be opened up.
    I'm getting the exact same message on my other computer, a Mac Air.
    So basically, can't download new firmware and am stuck with a ****** airport extreme that needs to keep being reset, a factory reset, in order to use the internet, but then continues to give me the same message.
    Thanks!

    See this article for instructions on how to install AirPort Utility 5.6 for Lion on Mountain Lion:
    http://www.macworld.com/article/1167965/mountain_lion_and_the_ancient_airport_ba se_station.html

  • How to trigger pop-up window in report and update data base from report

    Hi All,
    I have a requirement, in a report output list to trigger a pop up window with some rejection codes corresponding to each sales order when i select from the output list. Also i need to update data base by selecting one of the rejection code in the pop-up window list for that sales order. Can any one please let me know how to achive this.
    Also, i have check boxes for each record in the output list. Also, i have added one more check box as "Select All'. When select 'Sleect All' check box , all check boxes need to be checked, how to achieve this. PLease let me know.
    Thanks in advance.
    Regards,
    Rajesh

    Hi check this code of editable ALV report... I updated the data base with the changes made..in the editable ALV
    *& Report ZJAY_EDIT_ALV
    REPORT zjay_edit_alv.
    * TYPE-POOLS *
    TYPE-POOLS: slis.
    * INTERNAL TABLES/WORK AREAS/VARIABLES
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
    i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
    w_field TYPE slis_fieldcat_alv,
    p_table LIKE dd02l-tabname,
    dy_table TYPE REF TO data,
    dy_tab TYPE REF TO data,
    dy_line TYPE REF TO data.
    * FIELD-SYMBOLS *
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
    <dyn_wa> TYPE ANY,
    <dyn_field> TYPE ANY,
    <dyn_tab_temp> TYPE STANDARD TABLE.
    * SELECTION SCREEN *
    PARAMETERS: tabname(30) TYPE c DEFAULT 'MARA',
    lines(5) TYPE n DEFAULT 7.
    * START-OF-SELECTION *
    START-OF-SELECTION.
    * Storing table name
    p_table = tabname.
    * Create internal table dynamically with the stucture of table name
    * entered in the selection screen
    CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
    ASSIGN dy_table->* TO <dyn_table>.
    IF sy-subrc <> 0.
    MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.
    LEAVE TO LIST-PROCESSING.
    ENDIF.
    * Create workarea for the table
    CREATE DATA dy_line LIKE LINE OF <dyn_table>.
    ASSIGN dy_line->* TO <dyn_wa>.
    * Create another temp. table
    CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
    ASSIGN dy_tab->* TO <dyn_tab_temp>.
    SORT i_fieldcat BY col_pos.
    * Select data from table
    SELECT * FROM (p_table)
    INTO TABLE <dyn_table>
    UP TO lines ROWS.
    REFRESH <dyn_tab_temp>.
    * Display report
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_structure_name = p_table
    i_callback_user_command = 'USER_COMMAND'
    i_callback_pf_status_set = 'SET_PF_STATUS'
    TABLES
    t_outtab = <dyn_table>
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    ENDIF.
    *& Form SET_PF_STATUS
    * Setting custom PF-Status
    * -->RT_EXTAB Excluding table
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'ZSTANDARD'. "copy it from SALV func group standard
    ENDFORM. "SET_PF_STATUS
    *& Form user_command
    * Handling custom function codes
    * -->R_UCOMM Function code value
    * -->RS_SELFIELD Info. of cursor position in ALV
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    * Local data declaration
    DATA: li_tab TYPE REF TO data,
    l_line TYPE REF TO data.
    * Local field-symbols
    FIELD-SYMBOLS:<l_tab> TYPE table,
    <l_wa> TYPE ANY.
    * Create table
    CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
    ASSIGN li_tab->* TO <l_tab>.
    * Create workarea
    CREATE DATA l_line LIKE LINE OF <l_tab>.
    ASSIGN l_line->* TO <l_wa>.
    CASE r_ucomm.
    * When a record is selected
    WHEN '&IC1'.
    * Read the selected record
    READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
    rs_selfield-tabindex.
    IF sy-subrc = 0.
    * Store the record in an internal table
    APPEND <dyn_wa> TO <l_tab>.
    * Fetch the field catalog info
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = p_table
    CHANGING
    ct_fieldcat = i_fieldcat
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    IF sy-subrc = 0.
    * Make all the fields input enabled except key fields
    w_field-input = 'X'.
    MODIFY i_fieldcat FROM w_field TRANSPORTING input
    WHERE key IS INITIAL.
    ENDIF.
    * Display the record for editing purpose
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_structure_name = p_table
    it_fieldcat = i_fieldcat
    i_screen_start_column = 10
    i_screen_start_line = 15
    i_screen_end_column = 200
    i_screen_end_line = 20
    TABLES
    t_outtab = <l_tab>
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc = 0.
    * Read the modified data
    READ TABLE <l_tab> INDEX 1 INTO <l_wa>.
    * If the record is changed then track its index no.
    * and populate it in an internal table for future
    * action
    IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
    <dyn_wa> = <l_wa>.
    i_index = rs_selfield-tabindex.
    APPEND i_index.
    ENDIF.
    ENDIF.
    ENDIF.
    * When save button is pressed
    WHEN 'SAVE'.
    * Sort the index table
    SORT i_index.
    * Delete all duplicate records
    DELETE ADJACENT DUPLICATES FROM i_index.
    LOOP AT i_index.
    * Find out the changes in the internal table
    * and populate these changes in another internal table
    READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
    IF sy-subrc = 0.
    APPEND <dyn_wa> TO <dyn_tab_temp>.
    ENDIF.
    ENDLOOP.
    * Lock the table
    CALL FUNCTION 'ENQUEUE_E_TABLE'
    EXPORTING
    mode_rstable = 'E'
    tabname = p_table
    EXCEPTIONS
    foreign_lock = 1
    system_failure = 2
    OTHERS = 3.
    IF sy-subrc = 0.
    * Modify the database table with these changes
    MODIFY (p_table) FROM TABLE <dyn_tab_temp>.
    REFRESH <dyn_tab_temp>.
    * Unlock the table
    CALL FUNCTION 'DEQUEUE_E_TABLE'
    EXPORTING
    mode_rstable = 'E'
    tabname = p_table.
    ENDIF.
    ENDCASE.
    rs_selfield-refresh = 'X'.
    ENDFORM. "user_command

  • How to update base java and use same jbuilder

    hi,
    I use jdk 3.500.24.00 foundation and the default java version that comes along with jbuilder which is 1.2.2. However, i need to use the features of jdk.1.4 and so i need to update the base java version ie jbuilder 3.5 should be able to use 1.4 rather than 1.2. I will keep 1.2 during the transition from 1.2 to 1.4.
    Thanks
    Deepak

    Thanks Nasch!
    I did that allready the problem is it gives vm error cound not start vm. I even tried fiddling with bin/jdk.config, If i give the path for jdk1.4 it give vm error. however if i use the orginal setting which pin points to jdk1.2.2 it works.
    Now even though i have modified the path in default project setting in jbuilder i get the error if i change the setting in jdk.config to pin point to new path that would be jdk1.4. Any Idea why or how this can be solved?
    Derik

  • How to update view  without modifying the base table ?

    Hi Experts , I need help in two qurstions
    1. How to update a view without modifying the base table ?
    2. How to write a file unix operating system in pl/sql ? is there any built in procedure is there ?
    Thank you

    Hi,
    I'm not sure what you're asking in either question. It would help if you gave a specific example of what you want to do.
    SowmyRaj wrote:
    Hi Experts , I need help in two qurstions
    1. How to update a view without modifying the base table ?You can't.
    Views don't contain any data; they just query base tables.
    You can change the definition of a view (CREATE OR REPLACE VIEW ...) so that it appears that the base table(s) have changed; that won't change the base tables.
    2. How to write a file unix operating system in pl/sql ? is there any built in procedure is there ?The package utl_file has routines for working with files.

  • How to update one table from another

    I am creating scripts in Oracle 10g. I have a table that has data corruption on three date fields.
    I created a table with the following sql of all the affected rows:
    CREATE TABLE LSU_INTER_FIX_DATE AS
    select request_id,received_date,planned_start_date, actual_start_date
    from lsu_inter2_requests_t
    where received_date < to_date('01-JAN-1900')
    OR planned_start_date < to_date('01-JAN-1900')
    OR actual_start_date < to_date('01-JAN-1900')
    I then repaired all of the rows with three data fixes
    UPDATE LSU_INTER_FIX_DATE
    SET received_date = TO_CHAR(received_date,'YY-MON') ||'-'||(TO_CHAR(received_date,'RRRR') + 2000)
    where received_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET planned_start_date = TO_CHAR(planned_start_date,'YY-MON') ||'-'||(TO_CHAR(planned_start_date,'RRRR') + 2000)
    where planned_start_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET actual_start_date = TO_CHAR(actual_start_date,'YY-MON') ||'-'||(TO_CHAR(actual_start_date,'RRRR') + 2000)
    where actual_start_date < to_date('01-JAN-1900')
    I now want to update the original base table with the corrected data so I wrote the following SQL UPDATE command:
    UPDATE lsu_inter2_requests_t aaa
    SET aaa.received_date = bbb.received_date
    FROM LSU_INTER_FIX_DATE bbb WHERE aaa.request_id = bbb.request_id
    When I run this sql Oracle returns the error “ORA-00933 SQL command not properly ended.” How do I update multiple rows in one table from another table that share the same primary key?

    Comet wrote:
    I am creating scripts in Oracle 10g. I have a table that has data corruption on three date fields.
    I created a table with the following sql of all the affected rows:
    CREATE TABLE LSU_INTER_FIX_DATE AS
    select request_id,received_date,planned_start_date, actual_start_date
    from lsu_inter2_requests_t
    where received_date < to_date('01-JAN-1900')
    OR planned_start_date < to_date('01-JAN-1900')
    OR actual_start_date < to_date('01-JAN-1900')
    I then repaired all of the rows with three data fixes
    UPDATE LSU_INTER_FIX_DATE
    SET received_date = TO_CHAR(received_date,'YY-MON') ||'-'||(TO_CHAR(received_date,'RRRR') + 2000)
    where received_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET planned_start_date = TO_CHAR(planned_start_date,'YY-MON') ||'-'||(TO_CHAR(planned_start_date,'RRRR') + 2000)
    where planned_start_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET actual_start_date = TO_CHAR(actual_start_date,'YY-MON') ||'-'||(TO_CHAR(actual_start_date,'RRRR') + 2000)
    where actual_start_date < to_date('01-JAN-1900')
    I now want to update the original base table with the corrected data so I wrote the following SQL UPDATE command:
    UPDATE lsu_inter2_requests_t aaa
    SET aaa.received_date = bbb.received_date
    FROM LSU_INTER_FIX_DATE bbb WHERE aaa.request_id = bbb.request_id
    When I run this sql Oracle returns the error “ORA-00933 SQL command not properly ended.” How do I update multiple rows in one table from another table that share the same primary key?I am not convinced you have what you think you have
    >
    UPDATE LSU_INTER_FIX_DATE
    SET received_date = TO_CHAR(received_date,'YY-MON') ||'-'||(TO_CHAR(received_date,'RRRR') + 2000)
    where received_date < to_date('01-JAN-1900')
    When you want to produce a DATE datatype when starting with a string,
    you must use TO_DATE() on the SET line!
    (TO_CHAR(received_date,'RRRR') + 2000)since when do you do add characters (from TO_CHAR) with a constant number (2000)?
    You should NEVER EVER rely on implicit datatype conversion
    Edited by: sb92075 on Jul 27, 2011 7:09 PM

  • How to update all condition records at a time with some percentage or some

    Dear Sir,
    In PRD system we have more than 600 condtion records.
    Noe desiel hikes happend, due to that client want to update all condition records(600) at a time with required percentage or required value.
    How to update all records at a time
    With regards
    Lakshmikanth

    Hi,
    Through BDC or LSMW first you have to do the recording for particular transaction code and then base on that u have to prepare the flat file to upload the file for the same.
    For BDC programing you have to take the help of ABAP progmer but LSMW you can also do.
    For more information about LSMW plz go to following link :
    [LSMW |http://www.slideshare.net/arun_bala1/sap-sd-lsmw-legacy-system-migration-workbench/]
    [Step-by-Step Guide for using LSMW|www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc ]
    BDC
    [BDC Call Transaction|http://www.sapdevelopment.co.uk/bdc/bdc_ctcode.htm]
    [BDC Recording|http://www.sapdevelopment.co.uk/bdc/bdc_recording.htm]
    But it would be better for you to please contact to your ABAPer for BDC programming.
    Cheers...

  • IB:How to update a serial Number which has Inventory Material Transactions?

    Dear friends
    first of all thanks for your time and valuable solutions
    Install base: How to update a serial Number which has Inventory Material Transactions
    problem description:
    Install base > quick search
    Here is Installbase record, when I query from quick search
    Rec#     Item          Item Instance           Serial Number          Status
    1     300-7000-01      3000000           1000XXX-0538JQ0003 Return for Adv Exchange
    2     300-7000-01     8000000               1000XXX-0538JQ0003-     Return for Adv Exchange
    3     300-7000-01     5000000               1000XXX-0538JQ0003-A     Return for Adv Exchange
    looking above data, first and third records are the legitimate serial numbers(correct according to the client specs), second record is not legitimate since it has a dash as suffix, we found there are many illegitimate serial Numbers exists, needs to be updated with the right serial Numbers which I analyzed in excel after pulling data from mtl_material_transactions , oe_order_lines_all , mtl_serial_numbers , mtl_system_items_b
    basically these are all RMAs
    I need to update the second record as 1094SUZ-0538JQ0003-B as per the guidelines, while updating I need to keep all the existing contracts, Warranty, what ever material transations it has, need to be same.
    we have a package updating the serial numbers using IB API (csi_Item_Instance_Pub.update_item_instance) but it is updating only the records which has no serial numbers present for that instance, if there is a serial number already exists it is not working.
    user define error msg "Serial Number 1094SUZ-0538JQ0003- has Inventory Material Transactions. This serial number cannot be used to update an existing Item Instance", but I need to update this anyway!! or am I missing something here, please advice me
    below post looks like similar issue, talks about hard update, I have no clue, by doing that the updated serial number will have same transations, contracts, dates....attached to it like the previous serial number
    IB UPDATE_ITEM_INSTANCE ERROR - doesn't allow ACTIVE_START_DATE to change
    would be great If you guys help me out, really appreciated!!
    unfortunately I couldn't find any solutoin in metalink for the existing serial number update
    code for updating the serial number using IB API
              x_msg_count := 0;
    x_msg_data := '';
    p_instance_rec.instance_id := rec.child_instance_id;
    p_instance_rec.serial_number := rec.child_serial_number;
    p_instance_rec.object_version_number := rec.child_object_number;
    p_txn_rec.transaction_id := Fnd_Api.g_miss_num;
    p_txn_rec.transaction_date := SYSDATE;
    p_txn_rec.source_transaction_date := SYSDATE;
    p_txn_rec.transaction_type_id := 1;
    csi_Item_Instance_Pub.update_item_instance
    p_api_version => 1.0,
    p_commit => Fnd_Api.g_false,
    p_init_msg_list => Fnd_Api.g_false,
    p_validation_level => 1,
    p_instance_rec => p_instance_rec,
    p_ext_attrib_values_tbl => p_ext_attrib_values_tbl,
    p_party_tbl => p_party_tbl,
    p_account_tbl => p_account_tbl,
    p_pricing_attrib_tbl => p_pricing_attrib_tbl,
    p_org_assignments_tbl => p_org_assignments_tbl,
    p_asset_assignment_tbl => p_asset_assignment_tbl,
    p_txn_rec => p_txn_rec,
    x_instance_id_lst => x_instance_id_lst,
    x_return_status => x_return_status,
    x_msg_count => x_msg_count,
    x_msg_data => x_msg_data
    Thanks
    Suri

    Suri
    Used this. May not be perfect but should get you there. Only if the table is registered (all the seeded tables should be registered) this will work.
    select distinct a.table_name,b.column_name from fnd_tables a, fnd_columns b
    where a.table_id=b.table_id
    and upper(b.column_name) like '%SERIAL%'
    Also this is very old one but if you need history for this change add the history insert logic as well..
    DECLARE
    l_return_err VARCHAR2 (80);
    PROCEDURE debug (p_message IN VARCHAR2)
    IS
    BEGIN
    dbms_output.put_line (SUBSTR (p_message, 1, 255));
    END debug;
    BEGIN
    debug('======================================================================');
    debug('Switching from serial number XDT07406. to XDT07406 ');
    debug('======================================================================');
    UPDATE fa_additions_b
    SET serial_number = 'XDT07406'
    WHERE serial_number = 'XDT07406.';
    debug('No of rows in fa_additions_b updated :'||sql%rowcount);
    UPDATE fa_mass_additions
    SET serial_number = 'XDT07406'
    WHERE serial_number = 'XDT07406.';
    debug('No of rows in fa_mass_additions updated :'||sql%rowcount);
    UPDATE rcv_serial_transactions
    SET serial_num = 'XDT07406'
    WHERE serial_num = 'XDT07406.';
    debug('No of rows in rcv_serial_transactions updated :'||sql%rowcount);
    UPDATE mtl_serial_numbers
    SET serial_number = 'XDT07406'
    WHERE serial_number = 'XDT07406.';
    debug('No of rows in mtl_serial_numbers updated :'||sql%rowcount);
    UPDATE mtl_unit_transactions
    SET serial_number = 'XDT07406'
    WHERE serial_number = 'XDT07406.';
    debug('No of rows in mtl_unit_transactions updated :'||sql%rowcount);
    UPDATE csi_item_instances_h
    SET new_serial_number = 'XDT07406'
    WHERE new_serial_number = 'XDT07406.';
    debug('No of rows in csi_item_instances_h updated :'||sql%rowcount);
    UPDATE csi_t_txn_line_details
    SET serial_number = 'XDT07406'
    WHERE serial_number = 'XDT07406.';
    debug('No of rows in csi_t_txn_line_details updated :'||sql%rowcount);
    UPDATE csi_item_instances
    SET serial_number = 'XDT07406'
    WHERE serial_number = 'XDT07406.';
    debug('No of rows in csi_item_instances updated :'||sql%rowcount);
    UPDATE wsh_delivery_details
    SET serial_number = 'XDT07406'
    WHERE serial_number = 'XDT07406.';
    debug('No of rows in wsh_delivery_details updated :'||sql%rowcount);
    debug('======================================================================');
    debug('Switching from serial number jct20591 to JCT20591 ');
    debug('======================================================================');
    UPDATE fa_additions_b
    SET serial_number = 'JCT20591'
    WHERE serial_number = 'jct20591';
    debug('No of rows in fa_additions_b updated :'||sql%rowcount);
    UPDATE fa_mass_additions
    SET serial_number = 'JCT20591'
    WHERE serial_number = 'jct20591';
    debug('No of rows in fa_mass_additions updated :'||sql%rowcount);
    UPDATE rcv_serial_transactions
    SET serial_num = 'JCT20591'
    WHERE serial_num = 'jct20591';
    debug('No of rows in rcv_serial_transactions updated :'||sql%rowcount);
    UPDATE mtl_serial_numbers
    SET serial_number = 'JCT20591'
    WHERE serial_number = 'jct20591';
    debug('No of rows in mtl_serial_numbers updated :'||sql%rowcount);
    UPDATE mtl_unit_transactions
    SET serial_number = 'JCT20591'
    WHERE serial_number = 'jct20591';
    debug('No of rows in mtl_unit_transactions updated :'||sql%rowcount);
    UPDATE csi_item_instances_h
    SET new_serial_number = 'JCT20591'
    WHERE new_serial_number = 'jct20591';
    debug('No of rows in csi_item_instances_h updated :'||sql%rowcount);
    UPDATE csi_t_txn_line_details
    SET serial_number = 'JCT20591'
    WHERE serial_number = 'jct20591';
    debug('No of rows in csi_t_txn_line_details updated :'||sql%rowcount);
    UPDATE csi_item_instances
    SET serial_number = 'JCT20591'
    WHERE serial_number = 'jct20591';
    debug('No of rows in csi_item_instances updated :'||sql%rowcount);
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_return_err :='Updating in one of the script has this error:'|| substrb(sqlerrm, 1, 55);
    debug('Value of l_return_err='||l_return_err);
    END;
    Thanks
    Nagamohan

  • How to update transaction data automatically into MySQL database using PI

    Dear All,
    With reference to subject matter I want a sincere advice regarding how to update transaction data automatically into MySQL database using PI. Is there any link available where I can get step-by-step process.
    Ex: I have a MYSQL database in my organization. Whenever a delivery created in SAP some fields like DO Number, DO quantity, SO/STO number should get updated in MYSQL database automatically.
    This scenario is related to updation of transactional data into MYSQL DB and I want your suggestions pertaining to same issue.
    Thanks and Regards,
    Chandra Sekhar

    Hi .
    Develop a sceanrio between SAP to Database system,When the data updates in SAP Tables read the data and update it in DATA Base using JDBC adapter,but there will be some delay in updating data in MySQL.
    serach in sdn for IDOC-TOJDBC sceannario,many documents available for the same.
    Regards,
    Raja Sekhar

  • Update Excise base value in MRP based and Non-MRP based billing

    Hi Gurus,
    We need to update Excise Base Value for Statistical Condition type. How to configure the same ?
    Sl.No  Pricing Condition Type      Active   Statistical           Passed to Accounting        
    1        MRP Price (Statistical)                                                                               
    2        Abatement (Statistical)                                                                               
    3       Surcharge  (Active&Passed to Accounting)
    4      Assessabel value (Statistical)
    (No:4 This is the base for calculating Excise duties i.e Excise Base Value)
    5       List Price (Statistical)                                              
    6       Customer Discount(Statistical)                             
    7      Surcharge(Active&Passed to Accounting)                                                                 
    8      Net Price (Active&Passed to Accounting)                                                                     
    9      BED   (Active&Passed to Accounting)                                                                          
    10    ECess  (Active&Passed to Accounting)                                                                       
    11   SECess  (Active&Passed to Accounting)
    12   Total collected from Customer(Statistical)              
    Issue: When there is MRP Price higher than the List Price, then the Cutomer will be charged on the basis of Net Price only, but the duties amount to be paid to the government on MRP Price. so in this case I can not calculate Excise Duties on the Actual Net Price condition which is active and passed on to accounting. And always the Excise duties to be calculated on Assessable value(no:4). But that condition type if I make activate then it will pass to accounting and also getting added to the Net Value(KOMP-NETWR). How to come out of this situation.(as per the customer requirement both MRP based materials and non-MRP based materials are also considered in the same sale order i.e with the same pricing procedure).
    Becasue of this EXBAS is not getting updated in the J_1IEXCDTL.
    Gurus, Share your valuable experiences and suggestions.
    Thanks &Regards
    Sreekanth
    09611147585

    Dear Lakshmipathi,
    As per your suggestion, I have maintained Material Assessable Value and then also the duty values are calculating on the basis of Assessable value maintained in the Pricing Procedure. It is not taking the Material Assessable Value into consideration. And it is not getting updated the Excise Base Value.
    In which case Material Assessable value will be taken into consideration?
    How to update the Excise Base Value in J_1IEXCDTL tables?
    Thanks&Regards
    Sreekanth

Maybe you are looking for

  • Sort Issue on KM Document Name

    Hi, I am using a layout set to display a list of documents with the following components : Layout Set u2013 ConsumerTable Layout Controller u2013 SimpleLayoutController Collection Renderer u2013 ConsumerTableCollectionRenderer ResourceRenderer u2013

  • How to retrieve the Field Name of a Table

    Hi guys, I'm trying to retrieve the field name of a table in java, but i don't know how to do it. Could somebody help me?Let say i have a table name Itemmaster, then i want to retrieve its field and display to dos prompt. Example : Item No. Descripti

  • Apexir_REPORT_ID

    Hello, I've an urgent question concerning interactive reports: How can I get and use the apexir_REPORT_ID in a dynamic action with "Action-type" = "Execute PL/SQL-Code"? If I choose "Action type" = "Execute JavaScript Code" I can get the apexir_REPOR

  • Harddrive problem on 845PE MAX (PCB2.0)

    I have a harddrive that probably is dead or something, and I get two strange sounds when the bios is trying to detect the harddrive. I wonder if these are diagnosic sounds ? In that case, what are the problem when there are these 2 sounds ?  ?( Reaso

  • My Photoshop CS6 wont update to Photoshop(R) CS6 13.0.1.3    I am getting errowmassage

    My Photoshop CS6 wont update to Photoshop(R) CS6 13.0.1.3    I am getting errowmassage.