Unable to load into XMLTYPE column: enumeration value considered as boolean
HI Gentlemen,
I have a problem with my XMLTYPE load procedure. The schemas have been registered:
SQL> select any_path from resource_view where any_path like '%GKSADMIN/ICD%';
ANY_PATH
/sys/schemas/GKSADMIN/ICD
/sys/schemas/GKSADMIN/ICD/datentypen_V1.40.xsd
/sys/schemas/GKSADMIN/ICD/ehd_header_V1.40.xsd
/sys/schemas/GKSADMIN/ICD/ehd_root_V1.40.xsd
/sys/schemas/GKSADMIN/ICD/icd_body.xsd
/sys/schemas/GKSADMIN/ICD/icd_header.xsd
/sys/schemas/GKSADMIN/ICD/icd_root.xsd
/sys/schemas/GKSADMIN/ICD/keytabs_V1.40.xsd
8 Zeilen ausgewählt.The table has been created:
SQL> describe icd
Name Null? Typ
ID CHAR(2)
XML_DOCUMENT SYS.XMLTYPE(XMLSchema "ICD/i
cd_root.xsd" Element "ehd")
STORAGE Object-relational TY
PE "ICD$ICD_ROOT_TYP"And I try to insert an instance document:
SQL> @loadxmlfileascolumn_int
Geben Sie einen Wert für source_directory ein: c:\gks\kbv\c\icd\xml
alt 1: create or replace directory SOURCE_DIR as '&source_directory'
neu 1: create or replace directory SOURCE_DIR as 'c:\gks\kbv\c\icd\xml'
Verzeichnis wurde erstellt.
Geben Sie einen Wert für xmltypetable ein: icd
alt 4: INSERT INTO &XMLTypeTable
neu 4: INSERT INTO icd
Geben Sie einen Wert für id ein: 01
Geben Sie einen Wert für instancedocument ein: icdtest.xml
alt 5: VALUES (&id, XMLType(bfilename('SOURCE_DIR', '&InstanceDocument'),
neu 5: VALUES (01, XMLType(bfilename('SOURCE_DIR', 'icdtest.xml'),
declare
FEHLER in Zeile 1:
ORA-31038: Ungültiger boolean Wert: "j"
ORA-06512: in Zeile 4
SQL> spool offAs the schemas are very big, i copied only relevant parts of them to show how the values are defined (in icd_body.xsd):
<xs:element name="abrechenbar">
<xs:annotation>
<xs:documentation>Kennzeichnung, ob (abrechenbarer) ICD-10-GM-Code</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="V" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="j"/>
<xs:enumeration value="n"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
SQL> spool off
"j" and "n" are for Yes and No in German. But anyway, how could it become a Boolean? Why is it invalid?
Can you please help me so that I can load XMLTYPE contents?
Thanks, regards
Miklos HERBOLY
Sorry, I found one place where a boolean will be expected. I modified in the instance document so that it has true or false. And still something is recognized as boolean with the value of "j".
Edited by: mh**** on Jul 4, 2011 4:43 AM
Edited by: mh**** on Jul 4, 2011 5:07 AM
I don't get it, it should work, right? Although I am not sure if a XMLType Object Relational column is supported, but then again this is not clear in the documentation.
The only thing I can think of is that the attribute "V" is enforced as a boolean in the database on lower Object Relational level or...
Similar Messages
-
Unable to load into XMLTYPE column
HI Gentlemen,
I have considerable difficulties with loading XML content into an XMLTYPE column. Here are the annotated schemas:
SQL> select any_path from resource_view where any_path like '%GKSADMIN/ICD%';
ANY_PATH
/sys/schemas/GKSADMIN/ICD
/sys/schemas/GKSADMIN/ICD/datentypen_V1.40.xsd
/sys/schemas/GKSADMIN/ICD/ehd_header_V1.40.xsd
/sys/schemas/GKSADMIN/ICD/ehd_root_V1.40.xsd
/sys/schemas/GKSADMIN/ICD/icd_body.xsd
/sys/schemas/GKSADMIN/ICD/icd_header.xsd
/sys/schemas/GKSADMIN/ICD/icd_root.xsd
/sys/schemas/GKSADMIN/ICD/keytabs_V1.40.xsd
8 Zeilen ausgewählt.And here is the relational table:
SQL> describe icd
Name Null? Typ
ID CHAR(2)
XML_DOCUMENT SYS.XMLTYPE(XMLSchema "ICD/i
cd_root.xsd" Element "ehd")
STORAGE Object-relational TY
PE "ICD$ICD_ROOT_TYP"Now, when I try to load an instance document (which has proven OK with xmloracle), the following happens:
SQL> @loadxmlfileascolumn_int
Geben Sie einen Wert für source_directory ein: c:\gks\kbv\c\icd\xml
alt 1: create or replace directory SOURCE_DIR as '&source_directory'
neu 1: create or replace directory SOURCE_DIR as 'c:\gks\kbv\c\icd\xml'
Verzeichnis wurde erstellt.
Geben Sie einen Wert für xmltypetable ein: icd
alt 4: INSERT INTO &XMLTypeTable
neu 4: INSERT INTO icd
Geben Sie einen Wert für id ein: 01
Geben Sie einen Wert für instancedocument ein: icdtest.xml
alt 5: VALUES (&id, XMLType(bfilename('SOURCE_DIR', '&InstanceDocument'),
neu 5: VALUES (01, XMLType(bfilename('SOURCE_DIR', 'icdtest.xml'),
declare
FEHLER in Zeile 1:
ORA-01830: Datumsformatstruktur endet vor Umwandlung der gesamten
Eingabezeichenfolge
ORA-06512: in Zeile 4
SQL> spool offSince the schemas are very big, I took only relevant parts of them to show:
<ehd:document_type_cd V="ICD" DN="ICD-Stammdatei" S="1.2.276.0.76.5.100"/>
<ehd:service_tmr V="2010-01-01..2010-12-31"/>
<ehd:origination_dttm V="2009-11-10+01:00"/>Guilty is allegedly origination_dttm with its time zone. However, consider the type resolution below that leads to xs:date. This should be able to accommodate the time zone as well.
<!-- ************************ origination_dttm_typ ********************************* -->
<xs:element name="origination_dttm" type="origination_dttm_typ">
<xs:annotation>
<xs:documentation>Erstellungsdatum</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="origination_dttm_typ">
<xs:complexContent>
<xs:extension base="v_date_typ"/>
</xs:complexContent>
</xs:complexType>
v_date_typ: enthält nur den V-Attribut für einfache Datums-Angaben
<!-- ************************ v_date_typ ********************************** -->
<xs:complexType name="v_date_typ">
<xs:attribute name="V" type="xs:date" use="required"/>
</xs:complexType>When I delete the time zone portion in the instance document, it again works.
(However, other errors will then be reported--another issue.)
Can you help me to find out what is wrong? Is it my error or a bug?
Thanks, kind regards,
Miklos HERBOLY
Edited by: mh**** on Jul 3, 2011 10:55 AMThis is Oracle feature (at least in 11g R2). See Working with Timezones from XML DB Developer's Guide: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16659/xdb05sto.htm#autoId62
The chapter also includes an example how to adjust the schema with Oracle specific annotation.
See also http://stackoverflow.com/questions/6370035/why-dbms-xmlschema-fails-to-validate-a-valid-xsdatetime/6382096#6382096
Edited by: 836290 on Jul 4, 2011 7:56 AM -
Unable to load into XMLTYPE column--ORA-21700
HI Gentlemen,
I have a nice schema-based table and want to insert into it. However, I always get ORA-21700. Which object is marked for delete? I did not mark anything.
SQL> @createIcdTable
Tabelle wurde gelöscht.
Tabelle wurde erstellt.
SQL> describe icd
Name Null? Typ
ID CHAR(2)
XML_DOCUMENT SYS.XMLTYPE(XMLSchema "ICD/i
cd_root.xsd" Element "ehd")
STORAGE Object-relational TY
PE "ICD$ICD_ROOT_TYP"And here is the load script:
SQL> @loadxmlfileascolumn_int
Geben Sie einen Wert für source_directory ein: c:\gks\kbv\c\icd\xml
alt 1: create or replace directory SOURCE_DIR as '&source_directory'
neu 1: create or replace directory SOURCE_DIR as 'c:\gks\kbv\c\icd\xml'
Verzeichnis wurde erstellt.
Geben Sie einen Wert für xmltypetable ein: icd
alt 4: INSERT INTO &XMLTypeTable
neu 4: INSERT INTO icd
Geben Sie einen Wert für id ein: 01
Geben Sie einen Wert für instancedocument ein: test.xml
alt 5: VALUES (&id, XMLType(bfilename('SOURCE_DIR', '&InstanceDocument'),
neu 5: VALUES (01, XMLType(bfilename('SOURCE_DIR', 'test.xml'),
declare
FEHLER in Zeile 1:
ORA-21700: Objekt nicht vorhanden oder zum Löschen markiert
ORA-06512: in Zeile 4
SQL> spool offCould anybody help me how to circumvent this? Or a bug again?
Thanks, regards
Miklos HERBOLY
Edited by: mh**** on Jul 4, 2011 10:31 AMHI mdrake,
Thank you for your reply. I executed the schema registration with gentables=TRUE: the same error occurred. Here are the schema dependencies--I can not find any recursion in them. Note that schema file names end in .ann (for annotated), but registered schema urls's are .xsd names.
ehd_header_V1.40.ann
<xs:include schemaLocation="ICD/datentypen_V1.40.xsd"/>
ehd_root_V1.40.ann
<xs:include schemaLocation="ICD/ehd_header_V1.40.xsd"/>
<xs:include schemaLocation="ICD/keytabs_V1.40.xsd"/>
<xs:import namespace="urn:ehd/icd/001" schemaLocation="ICD/icd_body.xsd"/>
icd_header.ann
<xs:include schemaLocation="ICD/ehd_header_V1.40.xsd"/>
icd_root.ann
<xs:include schemaLocation="ICD/ehd_root_V1.40.xsd"/>
<xs:include schemaLocation="ICD/keytabs_V1.40.xsd"/>
<xs:include schemaLocation="ICD/icd_header.xsd"/>
<xs:import namespace="urn:ehd/icd/001" schemaLocation="ICD/icd_body.xsd"/>
keytabs_V1.40.ann
datentypen_V1.40.ann
icd_body.ann
--Then I executed your query, setting NULL to ?, with the following results (I am sorry about the bulky stuff here)
SQL> @m
URL NAME TBL
ICD/datentypen_V1.40.xsd document_relationship.type_cd ?
ICD/datentypen_V1.40.xsd related_document ?
ICD/datentypen_V1.40.xsd id ?
ICD/datentypen_V1.40.xsd set_id ?
ICD/datentypen_V1.40.xsd version_nbr ?
ICD/datentypen_V1.40.xsd intended_recipient.type_cd ?
ICD/datentypen_V1.40.xsd function_cd ?
ICD/datentypen_V1.40.xsd originator.type_cd ?
ICD/datentypen_V1.40.xsd function_cd ?
ICD/datentypen_V1.40.xsd participation_tmr ?
ICD/datentypen_V1.40.xsd provider.type_cd ?
ICD/datentypen_V1.40.xsd function_cd ?
ICD/datentypen_V1.40.xsd participation_tmr ?
ICD/datentypen_V1.40.xsd group.type_cd ?
ICD/datentypen_V1.40.xsd id ?
ICD/datentypen_V1.40.xsd person_name ?
ICD/datentypen_V1.40.xsd nm ?
ICD/datentypen_V1.40.xsd GIV ?
ICD/datentypen_V1.40.xsd MID ?
ICD/datentypen_V1.40.xsd FAM ?
ICD/datentypen_V1.40.xsd PFX ?
ICD/datentypen_V1.40.xsd SFX ?
ICD/datentypen_V1.40.xsd DEL ?
ICD/datentypen_V1.40.xsd id ?
ICD/datentypen_V1.40.xsd STR ?
ICD/datentypen_V1.40.xsd HNR ?
ICD/datentypen_V1.40.xsd POB ?
ICD/datentypen_V1.40.xsd ZIP ?
ICD/datentypen_V1.40.xsd CTY ?
ICD/datentypen_V1.40.xsd STA ?
ICD/datentypen_V1.40.xsd CNT ?
ICD/datentypen_V1.40.xsd ADL ?
ICD/datentypen_V1.40.xsd patient.type_cd ?
ICD/datentypen_V1.40.xsd person ?
ICD/datentypen_V1.40.xsd birth_dttm ?
ICD/datentypen_V1.40.xsd administrative_gender_cd ?
ICD/datentypen_V1.40.xsd local_header ?
ICD/datentypen_V1.40.xsd id ?
ICD/datentypen_V1.40.xsd interface.nm ?
ICD/datentypen_V1.40.xsd version ?
ICD/datentypen_V1.40.xsd description ?
ICD/datentypen_V1.40.xsd scope.type_cd ?
ICD/icd_body.xsd kapitel_liste ?
ICD/icd_body.xsd diagnosethesaurus_liste ?
ICD/icd_body.xsd kapitel ?
ICD/icd_body.xsd nummer ?
ICD/icd_body.xsd von_icd_code ?
ICD/icd_body.xsd bis_icd_code ?
ICD/icd_body.xsd bezeichnung ?
ICD/icd_body.xsd gruppen_liste ?
ICD/icd_body.xsd gruppe ?
ICD/icd_body.xsd von_icd_code ?
ICD/icd_body.xsd bis_icd_code ?
ICD/icd_body.xsd bezeichnung ?
ICD/icd_body.xsd diagnosen_liste ?
ICD/icd_body.xsd diagnose ?
ICD/icd_body.xsd icd_code ?
ICD/icd_body.xsd bezeichnung ?
ICD/icd_body.xsd abrechenbar ?
ICD/icd_body.xsd diagnosen_liste ?
ICD/icd_body.xsd diagnosethesaurus_liste ?
ICD/icd_body.xsd kodierrichtlinien_liste ?
ICD/icd_body.xsd notationskennzeichen ?
ICD/icd_body.xsd geschlechtsbezug ?
ICD/icd_body.xsd geschlechtsbezug_fehlerart ?
ICD/icd_body.xsd untere_altersgrenze ?
ICD/icd_body.xsd obere_altersgrenze ?
ICD/icd_body.xsd altersbezug_fehlerart ?
ICD/icd_body.xsd krankheit_in_mitteleuropa_sehr_s ?
ICD/icd_body.xsd schlüsselnummer_mit_inhalt_beleg ?
ICD/icd_body.xsd infektionsschutzgesetz_meldepfli ?
ICD/icd_body.xsd infektionsschutzgesetz_abrechnun ?
ICD/icd_body.xsd diagnosethesaurus ?
ICD/icd_body.xsd hausarztkodierung ?
ICD/icd_body.xsd akr_ref ?
ICD/ehd_header_V1.40.xsd id ?
ICD/ehd_header_V1.40.xsd set_id ?
ICD/ehd_header_V1.40.xsd version_nbr ?
ICD/ehd_header_V1.40.xsd document_type_cd ?
ICD/ehd_header_V1.40.xsd service_tmr ?
ICD/ehd_header_V1.40.xsd origination_dttm ?
ICD/ehd_header_V1.40.xsd state ?
ICD/ehd_header_V1.40.xsd interface ?
ICD/ehd_root_V1.40.xsd header ?
ICD/ehd_root_V1.40.xsd body ?
ICD/ehd_root_V1.40.xsd keytabs ?
ICD/ehd_root_V1.40.xsd icd:icd_stammdaten ?
ICD/icd_header.xsd id ?
ICD/icd_header.xsd document_type_cd ?
ICD/icd_header.xsd service_tmr ?
ICD/icd_header.xsd origination_dttm ?
ICD/icd_header.xsd interface ?
ICD/icd_header.xsd id ?
ICD/icd_header.xsd interface.nm ?
ICD/icd_header.xsd version ?
ICD/icd_header.xsd description ?
ICD/icd_root.xsd header ?
ICD/icd_root.xsd body ?
ICD/icd_root.xsd keytabs ?
ICD/icd_root.xsd icd:icd_stammdaten ?
100 Zeilen ausgewählt.
SQL> spool offWhat else could it be?
Well, installation did not complain at all, but when I inspect trace.log, there ar lines such as
PRCT-1400 : Ausführung von getcrshome nicht erfolgreich. Detaillierter Fehler: localnode
[main] [ 2011-07-01 22:38:00.836 CEST ] [HAUtils.isHASConfigured:412] Ignoring exception in isHASConfigured: PRCI-1112 : Übergebener Verzeichnisname war Null
PRCI-1112 : Übergebener Verzeichnisname war Null
...Can this interfere with my problem?
Edited by: mh**** on Jul 9, 2011 1:56 AM -
How to insert document into xmltype column through an http post request with perl
Oracle 11.2.0.3
Windows server 2008r2
Apache tomcat 7.0
Oracle APEX 4.2.1
Oracle APEX Listener 2.0
I would like to insert a XML document into the database through an APEX restful web service. The POST into the web service in done with PERL. The following code will insert an empty record in a table with column of XMLType type.
Perl Code
use strict;
use warnings;
use LWP::UserAgent;
use HTTP:Headers;
my $headers = HTTP::Headers->new();
my $url = "http://host:port:apex/<application_workspace>/<restfull service module>/<uri template>/
my $sendthis = ('<?xml version="1.0" enconding="utf-8"?>
<students>
<row>
<name>Mark</name>
<age>30</age>
</row>
<./students>';)
$headers -> header('Content-Type' => 'text/xml; charset=utf-8');
my $request = HTTP:Request->new('POST', $url, $headers, $sendthis);
$request-> protocol('HTTP/1.1');
my $browser = LWP::UserAgent->new();
my $response = $browser->request($request);
my $gotthis= $response->content();
my $the_file_data = $response->content();
APEX restful service
Method: POST
Source type: PL/SQL
MIME Types allowed: blank
require secure access: none
source:
{declare
doc varchar2(32000);
begin
insert into table <column name>
values(doc);
commit;
end;
Table code
{ create table <tablename>
(column name XMLType>);
The above code will insert an empty column into the table.
Any ideas why?It's a really bad idea to assemble XML using strings and string concatenation in SQL or PL/SQL. First there is a 4K limit in SQL, and 32K limit in PL/SQL, which means you end up constructing the XML in chunks, adding uneccessary complications. 2nd you cannot confirm the XML is valid or well formed using external tools.
IMHO it makes much more sense to keep the XML content seperated from the SQL / PL/SQL code
When the XML can be stored a File System accessable from the database, The files can be loaded into the database using mechansims like BFILE.
In cases where the XML must be staged on a remote file system, the files can be loaded into the database using FTP or HTTP and in cases where this is not an option, SQLLDR.
-Mark -
Inserting XML data into xmltype column
Oracle version: 10.1.0.5
OpenVms Alpha V8.3
1) Tried this and get the error shown below. Removed charset and placed a zero. Same error.
INSERT INTO xml_demo (xml_data) -- column of xmltype
VALUES
xmltype
bfilename('XML_DIR', 'MOL.XML'),
nls_charset_id('AL32UTF8')
ORA-22993: specified input amount is greater than actual source amount
ORA-06512: at "SYS.DBMS_LOB", line 637
ORA-06512: at "SYS.XMLTYPE", line 283
ORA-06512: at line 1
2) This PL/SQL block works. However maximum raw size around 32K. The file can be around 100K. May be I can load it into a table of raw and somehow concatnate it to insert. Not sure whether this is possible but I am sure there must me a simple way of doing this.
Subset of the xml file is pasted below.
set serveroutput on size 1000000
DECLARE
file1 bfile;
v_xml XMLType;
len1 number(6);
v_rec1 raw(32000);
BEGIN
file1 := bfilename('XML_DIR','MOL.XML');
DBMS_LOB.fileopen(file1, DBMS_LOB.file_readonly);
len1 := DBMS_LOB.getLength(file1);
v_rec1 := dbms_lob.substr(file1,len1,1);
v_xml := xmltype(UTL_RAW.CAST_TO_VARCHAR2(v_rec1));
INSERT INTO xml_demo (xml_data) VALUES (v_xml);
COMMIT;
DBMS_LOB.fileclose(file1);
exception
when others then
dbms_output.put_LINE (sqlerrm);
DBMS_LOB.fileclose(file1);
END;
<?xml version="1.0" encoding="UTF-8"?>
<MolDocument DtdVersion="3" DtdRelease="0">
<DocumentIdentification v="MOL_20100331_1500_1600"/>
<DocumentVersion v="1"/>
<DocumentType v="A43"/>
<SenderIdentification codingScheme="A01" v="17X100Z100Z0001H"/>
<SenderRole v="A35"/>
<ReceiverIdentification codingScheme="A01" v="10XFR-RTE------Q"/>
<ReceiverRole v="A04"/>
<CreationDateTime v="2010-03-31T14:10:00Z"/>
<ValidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
<Domain codingScheme="A01" v="10YDOM-1001A001A"/>
<MolTimeSeries>
<ContractIdentification v="RTE_20100331_1500_16"/>
<ResourceProvider codingScheme="A01" v="10XFR-RTE------Q"/>
<AcquiringArea codingScheme="A01" v="17Y100Z100Z00013"/>
<ConnectingArea codingScheme="A01" v="10YFR-RTE------C"/>
<AuctionIdentification v="AUCTION_20100331_1500_1600"/>
<BusinessType v="A10"/>
<BidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
<MeasureUnitQuantity v="MAW"/>
<Currency v="EUR"/>
<MeasureUnitPrice v="MWH"/>
<Direction v="A02"/>
<MinimumActivationQuantity v="50"/>
<Status v="A06"/>
<Period>
<TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
<Resolution v="PT60M"/>
<Interval>
<Pos v="1"/>
<Qty v="50"/>
<EnergyPrice v="50.45"/>
</Interval>
</Period>
</MolTimeSeries>
</MolDocument>Marc
Thanks. I understand what you are saying. I have been copying files in binary mode from NT servers into VMS. I have to get a proper xml file via FTP from the originating system to further investigate.
I have one last item i need help on. If anything looks obvious let me know:
+1) The xsd defintion of Qty (type: QuantityType) and EnergyPrice (type: Amount Type)+
<xsd:element name="Qty" type="ecc:QuantityType">
<xsd:annotation>
<xsd:documentation/>
</xsd:annotation>
</xsd:element>
<xsd:element name="EnergyPrice" type="ecc:AmountType" minOccurs="0">
<xsd:annotation>
<xsd:documentation/>
</xsd:annotation>
</xsd:element>
+2) Definition of AmountType and QuantityType in the parent xsd+
<xsd:complexType name="AmountType">
<xsd:annotation>
<xsd:documentation>
<Uid>ET0022</Uid>
<Definition>The monetary value of an object</Definition>
</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="v" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:totalDigits value="17"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
<!--_________________________________________________-->
<xsd:complexType name="QuantityType">
<xsd:annotation>
<xsd:documentation>
<Uid>ET0012</Uid>
<Definition>(Synonym "qty") The quantity of an energy product. Positive quantities shall not have a sign.</Definition>
</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="v" type="xsd:decimal" use="required"/>
</xsd:complexType>
<!--________________
+3. Data in the XML file+
<Period>
<TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
<Resolution v="PT60M"/>
<Interval>
<Pos v="1"/>
<Qty v="50"/>
<EnergyPrice v="50.45"/>
</Interval>
+4) When I do the load:+
the EnergyPrice is saved in the xmltype column as <EnergyPrice v="50"/>
Losing its decimal value of .45
+5) When I select as follows:+
**DEV** SQL>> l
1 SELECT
2 EXTRACTVALUE(x2.column_value,'/MolTimeSeries/Period/Interval/EnergyPrice/@v') v1,
3 EXTRACTVALUE(x2.column_value,'/MolTimeSeries/Period/Interval/EnergyPrice') v2,
4 EXTRACTVALUE(x2.column_value,'/MolTimeSeries/Period/Interval/Qty') v3
5 FROM balit_mol_xml x,
6 TABLE(
7 XMLSEQUENCE(
8 EXTRACT(x.xml_payload, '/MolDocument/MolTimeSeries')
9 )
10 ) x2
11* WHERE EXISTSNODE(x.xml_payload,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1
+6) get the result+
50
AmountType479_T(XDB$RAW_LIST_T('1301000000'), 50)
QuantityType471_T(XDB$RAW_LIST_T('1301000000'), 50)
+7) XDB$RAW_LIST_T('1301000000'),+
Does that tell what I am doing wrong? -
How to insert 4K of XML data into XMLType column?
I use OCCI and our Oracle version is 9.2.0.1.0. I have successfully been able to insert xml data (any size) into a clob column using "insert into...values(.., empty_clob()) returning c1 into :3"; and then using Statement::GetClob() to acquire a reference to the internal clob and populate it. I cannot seem to be able to do the same when the column type is of XMLType.
I could not find a single sample code which demonstrates inserting into a table with a XMLType column. Using SetDataBuffer(OCCI_SQLT_STR) with data over 4000 bytes does not work.
I'd greatly appreciate any feedback.Pretty sure this was a bug in the base 9.2 release which was fixed in a patch drop. Try 9.2.0.6 or later.
-
Qosmio F - Unable to load into Windows or anything
Yesterday, while studying other day outside another student bumped the table I was studying on. I would say "tapped" as it was not that hard. The normal message appears where it says the laptop will move the harddrive to a safe location etc.
Shortly after maybe 10-20mins, I get a message on the laptop screen asking me to "backup the laptop" as there was some major error or failure. I clicked on the "additional information" and it basically said all my drives C:, G: and whatever I had disk failure or something. Unable to backup the laptop as I did not have CD's present to back it up with I took it home to do i today.
The laptop is refusing to even load into windows at the moment. Unable to back up or anything. Keeps loading into options about system repair, restore, memory diagnostics etc. nothing fixes it.
I've only purchased the laptop since oct/nov of 2010. Didnt start using it till jan/feb of this year also. Should I attempt to open up the HDD as it might have loosen out at the back or? Should I send it back to manufacturer to look at? It's critical exam time for me and this is devastating! Also flying overseas late June after exams and wishing to take the laptop over there. Please help! Thanks advance for all advice and suggestions.Hi Kyo,
Your posting is a little bit hard to understand and a screenshot of this error message would be useful but if you get an message about defective HDD and all partitions you should contact an authorized service provider in your country.
Your notebook should be still under warranty so the guys can replace the HDD for free. If you need some important data you can ask if they can rescue some files and do a backup. Alternative you can try it yourself if you buy an external HDD case for example. Then you can connect the HDD via USB to another computer. -
Problem inserting clob value into xmltype column
Hi all,
I have created a table in XML DB using as:
CREATE TABLE TransDetailstblCLOB ( id number, data_xml XMLType) XmlType data_xml STORE AS CLOB;
I am trying to insert large xml data into the data_xml column which is of type XMLTYPE.
I followed this link (http://www.oracle.com/technology/sample_code/tech/java/codesnippet/xmldb/HowToLoadLargeXML.html) to create a clob object and insert into xml.
I am getting the following error:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00229: input source is empty
Error at line 0
ORA-06512: at "SYS.XMLTYPE", line 254
ORA-06512: at line 1
My code snippet:
private static CLOB getCLOB(String xmlData, Connection conn) throws SQLException{
CLOB tempClob = null;
if(conn==null){
log.debug("Connection object is null");
throw new SQLException("Connection object is null");
try{
// If the temporary CLOB has not yet been created, create new
tempClob = CLOB.createTemporary(conn, true, CLOB.MODE_READWRITE);
// Open the temporary CLOB in readwrite mode to enable writing
tempClob.open(CLOB.MODE_READWRITE);
// Get the output stream to write
writer = tempClob.getCharacterOutputStream();
writer.write(xmlData);
} catch(SQLException sqlexp){
tempClob.freeTemporary();
sqlexp.printStackTrace();
} catch(Exception exp){
tempClob.freeTemporary();
exp.printStackTrace();
return tempClob;
public static void insertXML(String xmlData, Connection conn){
CLOB clob = null;
String query;
log.debug("Inside insertXML" +xmlData);
try{
query = "INSERT INTO TransDetailstbl1(data) VALUES (XMLType(?)) ";// Changed prev TransDetailstbl
// Get the statement Object
pstmt = conn.prepareStatement(query);
// xmlData is the string that contains the XML Data.
// Get the CLOB object using the getCLOB method.
clob = getCLOB(xmlData, conn);
// Bind this CLOB with the prepared Statement
pstmt.setObject(1, clob);
int i =pstmt.executeUpdate();
log.debug("pstmt.executeUpdate () status ::: "+i);
// Execute the Prepared Statement
if (i == 1) {
log.debug("Record Successfully inserted!");
} catch(SQLException sqlexp){
sqlexp.printStackTrace();
} catch(Exception exp){
exp.printStackTrace();
finally{
try{
pstmt.close();
// Flush and close the stream
writer.flush();
writer.close();
// Close the temporary CLOB
tempClob.close();
catch(Exception e)
log.debug("Cant close prepared statement.");
e.printStackTrace();
Can anyone help me out?
Please let me know if any other info is required.
Regards,
RobinaHi all,
I now modified the code to write the data using Stream.
I am getting this error message: SQLException while updateORA-24813: cannot send or receive an unsupported LOB
On googling it seems the its usually caused when I am using the different versions of oracle on
server and client.
My oracle details:
Database product version : Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
JDBC driver name : Oracle JDBC driver
JDBC driver version : 9.2.0.1.0
DataStoreHelper name is: com.ibm.websphere.rsadapter.OracleDataStoreHelper@22542254.
JDBC driver type : thin
Can anyone tell me how to proceed?
Thanks -
Loading data into XMLType column using dbms_xmlsave.insertxml get ORA-29532
The following simple test case succeeded in 9.2.0.1 but failed in 9.2.0.2.
CREATE OR REPLACE procedure InsertXML(xmlDoc IN VARCHAR2, tableName IN VARCHAR2) is
insCtx DBMS_XMLSave.ctxType;
rows number;
begin
insCtx := DBMS_XMLSave.newContext(tableName); -- get the context handle
rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
dbms_output.put_line(to_char(rows) || ' rows inserted');
DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
end;
CREATE TABLE XMLtable
(column1 xmltype)
exec insertxml('<?xml version = "1.0"?><ROWSET><ROW><COLUMN1><TEST>HELLO</TEST></COLUMN1></ROW></ROWSET>', 'XMLTABLE');Hi,
For your XML file I think you just need to enclose XML elemnts in ROWSET AND ROW TAGS - so xml should look like :
<ROWSET>
<ROW>
<DEPT>
</DEPT>
and just pass it as CLOB to dbms_xmlsave.insertXML proc.
I hope it should work.
I am also trying to insert XML file but with a bit complex structure having multiple nested elements.
I am not sure how to transform the external XML file to wrap it in ROWSET/ROW using XSLT. It's mandatory to use ROWSET/ROW tags to be able to insert in oracle tables. I am facing this problem right now. I am using object views to accomplish the purpose but still needs to figure out the way to apply stylesheet to incoming XML file.
If you come to know of any way, pls do let me know also.
Thanks -
Illegal combination when importing xml file into xmltype column
I have the following control file.
LOAD DATA
CHARACTERSET UTF8
INFILE *
INTO TABLE IMPORTRAWXML TRUNCATE
SITEID constant 0
,VENDORID constant 17
,SITEFORMATID constant 2
,"\\plutonium\outcomes\AHA GWTG-Outpatient\Programs\DataTransfer\LoadTest\V17_standard_test.xml" filler char(1000)
,RAWDATA LOBFILE ("\\plutonium\outcomes\AHA GWTG-Outpatient\Programs\DataTransfer\LoadTest\V17_standard_test.xml")
TERMINATED BY EOF
)When I run it using sqlldr command line I get the following error:
SQL*Loader-350: Syntax error at line 1.
Illegal combination of non-alphanumeric characters
<?xml version="1.0" encoding="ISO-8859-1"?>Does anyone have any idea what I am doing wrong here? If I remove the fully resolved path (both the control file and xml file are in the same folder) it tells me it can't find the file to load.
HELP!!!!
Thanks,
Evaevaleah wrote:
I have made sure all my home settings are correct in my registry editor and they are. Another thing to note is the control file I am using works 100% perfectly, beautifully when called from Toad for Oracle. It is when called from the command line utility that it fails. Is there anyway to determine what the difference could be?
So we know that I can work (toad works), but it doesn't yet work in a "cmd" environment.
Just as any other program Toad is also a client and uses NLS and other environment settings. Maybe these are stored in the registry, maybe the are being set by Toad by reading a configuration file while it is started or while running.
As said, on Windows its tricky...
Setting properties in the registry will not mean that they are the same a "cmd" window or maybe not even been set.
If you execute / run "cmd" then the "set" statement/command will output the environment settings that will be used during the livetime of that "cmd" session.
C:/> setIn my laptop environment (windows 7 64 bit) it will show the following
C:\>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\marco\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=00-00-000
ComSpec=C:\Windows\system32\cmd.exe
DEFLOGDIR=C:\ProgramData\McAfee\DesktopProtection
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\marco
LOCALAPPDATA=C:\Users\marco\AppData\Local
LOGONSERVER=\\AMISNT
MpConfig_ProductAppDataPath=C:\ProgramData\Microsoft\Windows Defender
MpConfig_ProductCodeName=AntiSpyware
MpConfig_ProductPath=C:\Program Files\Windows Defender
MpConfig_ProductUserAppDataPath=C:\Users\marco\AppData\Local\Microsoft\Windows
Defender
MpConfig_ReportingGUID=CA08B82B-EF0A-4107-89D8-ED5BB37E7515
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\oracle\product\11.2.0\dbhome_1\bin;C:\Windows\system32;C:\Windows;C:\Win
dows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PERL5LIB=c:\oracle\product\10.2.0\db_1\perl\5.8.3\lib\MSWin32-x64;c:\oracle\prod
uct\10.2.0\db_1\perl\5.8.3\lib;c:\oracle\product\10.2.0\db_1\perl\site\5.8.3;c:\
oracle\product\10.2.0\db_1\perl\site\5.8.3\lib;c:\oracle\product\10.2.0\db_1\sys
man\admin\scripts;
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 23 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=170a
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\marco\AppData\Local\Temp
TMP=C:\Users\marco\AppData\Local\Temp
USERDNSDOMAIN=AMIS
USERDOMAIN=AMIS
USERNAME=marco
USERPROFILE=C:\Users\marco
VBOX_INSTALL_PATH=C:\Program Files\Sun\VirtualBox\
VSEDEFLOGDIR=C:\ProgramData\McAfee\DesktopProtection
windir=C:\Windows
C:\>The only thing that identifies that I have Oracle installed is set in the %PATH% variable and %PERL5LIB%. From the path setting you can also deduct that I have Oracle 11 and Oracle 10 software installed. So when I execute "sqlldr" what NLS settings will it use and which tnsnames.ora alias for example to connect to the database...?
You can you do it and see what happens...
C:\>sqlldr
SQL*Loader: Release 11.2.0.1.0 - Production on Wed May 12 20:36:25 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Usage: SQLLDR keyword=value [,keyword=value,...]
Valid Keywords:
...So it will pick the first "sqlldr" in the %PATH% environment setting. But what about NLS...? As said to be absolute sure you will have to set it in your environment.
C:/> set ORACLE_HOME="C:\oracle\product\10.2.0\db_1"
C:\> set
Path=C:\oracle\product\11.2.0\dbhome_1\bin;C:\Windows\system32;C:\Windows;C:\Win
dows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PERL5LIB=c:\oracle\product\10.2.0\db_1\perl\5.8.3\lib\MSWin32-x64;c:\oracle\prod
uct\10.2.0\db_1\perl\5.8.3\lib;c:\oracle\product\10.2.0\db_1\perl\site\5.8.3;c:\
oracle\product\10.2.0\db_1\perl\site\5.8.3\lib;c:\oracle\product\10.2.0\db_1\sys
man\admin\scripts;
ORACLE_HOME="C:\oracle\product\10.2.0\db_1"
C:\> echo %ORACLE_HOME%
"C:\oracle\product\10.2.0\db_1"Because if I enter "sqlldr" it will pick the executable from the 11.2 install, but the ORACLE_HOME is set to the wrong environment
Executing sqlldr now will give me an error
C:\>sqlldr
Message 2100 not found; No message file for product=RDBMS, facility=ULMessage 21
00 not found; No message file for product=RDBMS, facility=UL
C:\>Another thing you can notice now is that from that output alone, you can't deduct the Oracle "sqlldr" version anymore. Setting the ORACLE_HOME environment to either 10.2 or 11.2 will cause "sqlldr" to execute normally (at least thats how it looks) BUT in the case of the oracle 10.2 setting it will use the wrong message files etc. At least not the correct software versions / files "sqlldr" is shipped with. So you can (and most of the time) will get strange errors.
C:\> set ORACLE_HOME=C:\oracle\product\10.2.0\db_1
C:\>sqlldr
SQL*Loader: Release 11.2.0.1.0 - Production on Wed May 12 20:45:00 2010
C:\>set ORACLE_HOME=C:\oracle\product\11.2.0\dbhome_1
C:\>sqlldr
SQL*Loader: Release 11.2.0.1.0 - Production on Wed May 12 20:49:50 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Usage: SQLLDR keyword=value [,keyword=value,...]
...In the registry you can find a lot of those variables are set for ORACLE_HOME, ORACLE_BASE, SQLPATH, maybe TNS_ADMIN, ORACLE_SID, NLS_LANG. You can find the variables IN the registry on two places. The most common one is the SYSTEM wide environment settings under //HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE and in my case for 11.2 under //HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/KEY_OraDb11g_Home1.
You could overrule this for to be active on "my user session", my login session as account "marco" under //HKEY_CURRENT_USER/Software/Oracle, but no one using Windows is doing this.
Besides the "cmd" and registry environment, there is a different place as well were you can set these parameters. In windows go to "start", click "control panel", click "system", click tab "Advanced" and then click on the button on the bottum with "Environment Variables". Here you can see the distinction between user and system wide variables as well. Here you can also set NLS_LANG, ORACLE_HOME etc. If I am not mistaken than these will be the default values used in a fresh "cmd" window session. But they can and will interfere with programs you start via clicking them. For example something a Java program like SQL Developer (and/or Toad). If those values are not overrulled by the program by for example using his own variables from a config file or else, those sessings from the "system" / control panel item will be used. If it is the wrong mix, you will encounter strange issues.
Setting ORACLE_HOME and ORACLE_BASE will be used by a lot of derived other settings for example the default place SQL*Net drivers and tnsnames aliases etc will be checked. For example setting the ORACLE_HOME to
C:\> set ORACLE_HOME=C:\oracle\product\10.2.0\db_1will result in that the tnsnames aliases from
C:\> set ORACLE_HOME=C:\oracle\product\10.2.0\db_1\NETWORK\adminwill be used and NOT the ones maybe needed from
C:\oracle\product\11.2.0\dbhome_1\NETWORK\adminYou can overrule this behavior by setting the TNS_ADMIN variable. By default, most explicit form for example on linux and Unix, the following rule will be used by Oracle
1) .tnsnames.ora in the home directory of the user
2) standard default: $ORACLE_HOME/network/admin
3) behavior can be overruled via setting $TNS_ADMINThe fact that you are able via Toad to execute it correctly proves you that it can be done. But Toad uses in your session "SQL*Net" or JDBC or ODBC or ADO or ? via its own configuration environment settings that are being set on which values...?
Both Oracle and Toad use the OSI model (http://en.wikipedia.org/wiki/OSI_model), both have to follow the same rules. There hasn't been changed that much over the years, character set conversions are done in the "two task common" layer of the data transport on either side (client/server) when data travels between a client and server. And don't forget a database can be also be a client when for instance database links are being used. One of the reasons to read old manuals because there the basics are still perfectly explained: http://download.oracle.com/docs/cd/A57673_01/DOC/net/doc/NWUS233/ch2.htm#twotask (Oracle 7.3.4 Networking Manual).
This long long story is just to show you that you have more control if you set variables explicitly in a "cmd" window (and or in a linux/unix shell (as long as the session isn't "forked")) BUT you will have to be precise. Check the environment a set those environment variables that control / that are being used by "sqlldr" (and that are probably more then you realised, for example that SQL_PATH variable is the default directory where SQL*Plus is looking and saving its "SQL" and spool "LIS" files).
HTH -
BI Z-Table as datasource unable to load into psa
Dear Experts
I have a ztable datasource. The ztable is in BI . The table contains text fields for all the attributes.
I have mapped this to 0customer attribute without mapping the text fields from the datasource / ztable.
I created an infopackage to full load all data from the table.
The infopackage was waiting at "Extraction " stage. It showed "xxx number of records were sent ".
At "processing" stage , the "data package" section shows message "A data packet is either sent with transfer method iDoc or psa to BI ......"
In the monitor wizard, the diagnosis showed: "the background job in the source system was not terminated. In this case it is probable that the tRFC to or from the soure system is incorrect. To check this, the ALE inbox of the source system must be checked and compared with the BI ALE inbox."
Please advise what could be the cause for not being able to load this data from ztable.
Thank you .
regards
BassDear Venkatesh,
I was unable to find any sm37 errors.
Can I confirm that to load to 0customer in BI7, the datasource created can be of type 3.x or BI7 type?
When creating the datasource, I selected non 3.x type. Only 2 types can be selected from.
Also, I rerun the infopackage (IP) with ST01 trace on my id for authorization and SQL trace.
Nothing was found.
The IP status is yellow : "Data not received in PSA Table"
Diagnosis : "Data has not been updated in PSA Table . The request is probably still running or there was a short dump."
and it appears to be waiting for something forever. It will time out and then the request is red.
regards
Bass -
Unable to create table with column default value with date interval
Please help to create table with calculated date defaullt value:
CREATE TABLE emp (
birth_date DATE DEFAULT sysdate + interval '3' day NOT NULL
or
CREATE TABLE emp (
some_date DATE,
birth_date DATE DEFAULT some_date NOT NULL
or
CREATE TABLE emp (
some_date DATE,
birth_date DATE DEFAULT some_date + interval '3' day NOT NULL
below syntax error:
TT1001: Syntax error in SQL statement before or at: "+"I'm afraid this is not possible; as per the SQL Reference, TimesTen only supports 'constant expressions' for the DEFAULT clause and none of these are constant expressions.
Chris -
Case Statement into XML , XMLType column
We are storing following(example) xml into xmltype column (column name xmlfile , table name xml_table) .
<?xml version = '1.0' encoding = 'UTF-8'?>
<context id="reporting_options">
<scenario>
<abc:isAllow>false</abc:isAllow>
</scenario>
</context>
<abc:tab1 contextRef="con1">89841</abc:tab1>
<abc:tab1 contextRef="con2">-18514</abc:tab1>
<abc:tab2 contextRef="con1">89841</abc:tab2>
<abc:tab2 contextRef="con2">-18514</abc:tab2>
<abc:tab3 contextRef="con1">By Current/Non-Current Classification</abc:tab3>
<abc:tab3 contextRef="con2">0</abc:tab3>
</xml>I want to extract the values for tab1 .. tab3 based on * <abc:isAllow>false</abc:isAllow>*. Now i'm doing in following way.Note , based on abc:isAllow values i need to pick contextRef="con1" or contextRef="con1".
select
case extractValue(xmlfile ,'//abc:isAllow', 'xxx:bac="http://www.abc.com/abc"')
when 'true' then extractValue(xmlfile ,'//abc:tab1[@contextRef="con1"]', 'xxx:bac="http://www.abc.com/abc"')
else extractValue(xmlfile ,'//*abc:tab1*[@contextRef="*con2*"]', 'xxx:bac="http://www.abc.com/abc"')
end as tab1,
case extractValue(xmlfile ,'//abc:isAllow', 'xxx:bac="http://www.abc.com/abc"')
when 'true' then extractValue(xmlfile ,'//abc:tab2[@contextRef="con1"]', 'xxx:bac="http://www.abc.com/abc"')
else extractValue(xmlfile ,'//abc:tab2*[@contextRef="con2"]', 'xxx:bac="http://www.abc.com/abc"')
end as tab2,
case extractValue(xmlfile ,'//abc:isAllow', 'xxx:bac="http://www.abc.com/abc"')
when 'true' then extractValue(xmlfile ,'//*abc:tab3*[@contextRef="con1"]', 'xxx:bac="http://www.abc.com/abc"')
else extractValue(xmlfile ,'//abc:tab3[@contextRef="con2"]', 'xxx:bac="http://www.abc.com/abc"')
end as tab3
from xml_tableI think , above query might not be optimized because "case when" part will ready abc:isAllow for each tag. and my actual xml is containing more than 200 tag. Any one suggest good way to handle this query.
Regards,
thees_k.TrySELECT XMLTYPE.GetClobVal
(XMLELEMENT
("variable",
XMLAttributes('vcInternationalDate[]' AS "type"),
XMLAGG(XMLELEMENT("item",
CASE
WHEN TEMPO IS NOT NULL
THEN XMLELEMENT("utc", TO_CHAR(TIME, 'dd/MM/yyyy HH24:MI:SS'))
END),
XMLELEMENT("timezone_offSet", TIMEZONE)))) AS "CREATIONDATE"
FROM twgenericosdb.TEST
WHERE ID = 1You could replace CASE with NVL2SELECT XMLTYPE.GetClobVal
(XMLELEMENT("variable",
XMLAttributes('vcInternationalDate[]' AS "type"),
XMLAGG(XMLELEMENT("item",
NVL2(TEMPO,
XMLELEMENT("utc", TO_CHAR(TIME, 'dd/MM/yyyy HH24:MI:SS')),
NULL),
XMLELEMENT("timezone_offSet", TIMEZONE))))) AS "CREATIONDATE"
FROM twgenericosdb.TEST
WHERE ID = 1Urs
Edited by: metzguar on 06.05.2010 15:04 -
Update query for XMLTYPE column
Hello everyone,
I have inserted xml data into XMLTYPE column of my table,xml data is something like this
<Data type="FYI">
<ID xmlns="http://orcl.com">T-1-1</ID>
<Category>FRAME</Category>
<ProductID>1</ProductID>
<Name xmlns="http://orcl.com">Frame </Name>
<Type>BASIC</Type>
<Code>INSTALL</Code>
<NodeID>1</NodeID>
</Data>
Now i need to update the values inside the <Data> element,like
ID == T-2-2
Category == IFRAME
ProductID == 1.1
Name == IFRAME
We are using oracle 10g R2.
Please help me out how to update. It would be very thankfull for your valuble suggestions
Thanks in advance<Services>
<DataService type="FRLY">
<ID xmlns="http://www.openapplications.org/oagis/9">T-1-1-FRLY</ID>
<CategoryCode>FRAME</CategoryCode>
<ProductOfferingID>1</ProductOfferingID>
<Name xmlns="http://www.openapplications.org/oagis/9">Frame Relay</Name>
<SubType>FRLY - BASIC</SubType>
<ActionCode>INSTALL</ActionCode>
<NodeID>1</NodeID>
<Contract>
<ID xmlns="http://www.openapplications.org/oagis/9" schemeName="Networx Universal">00000</ID>
<Category name="Contract Type">U</Category>
</Contract>
<Contract>
<Type xmlns="http://www.openapplications.org/oagis/9">Routine</Type>
</Contract>
<CustomerParty>
<Location/>
</CustomerParty>
<ProvisioningStatus type="BillingSetup">
<Description xmlns="http://www.openapplications.org/oagis/9">C</Description>
</ProvisioningStatus>
<MileStone>
<ID xmlns="http://www.openapplications.org/oagis/9">CWD</ID>
<Date>2007-01-29</Date>
</MileStone>
<ActivityStatus>
<Code xmlns="http://www.openapplications.org/oagis/9" name="DueDate"/>
<EffectiveDateTime xmlns="http://www.openapplications.org/oagis/9">2007-01-29T00:00:00Z</EffectiveDateTime>
</ActivityStatus>
<AssociatedIDs>
<ID xmlns="http://www.openapplications.org/oagis/9">1</ID>
</AssociatedIDs>
<AssociatedIDs>
<TemporaryID schemeName="OPKEY">34908</TemporaryID>
</AssociatedIDs>
<Location>
<ID xmlns="http://www.openapplications.org/oagis/9">T-510092</ID>
</Location>
<OrderID>RequestID</OrderID>
<Accessory>
<ActionCode>ADD</ActionCode>
<Description xmlns="http://www.openapplications.org/oagis/9">IBM ESERVER-XSERIES306</Description>
<CategoryCode>5</CategoryCode>
<InstallVendorParty>
<Name xmlns="http://www.openapplications.org/oagis/9">MCI</Name>
</InstallVendorParty>
</Accessory>
<Circuit>
<ID xmlns="http://www.openapplications.org/oagis/9">T-1-1-FRLY</ID>
<AssociatedIDs/>
</Circuit>
</DataService>
</Services>
This was my xml which i have inserted into DB for the column XMLTYPE.Now i need to update few values in this whole file like values of
ID under<DataService>
Name under <DataService>
ID under <Contract>
Description under <ProvisioningStatus>
i was using the UPDATEXML query to update those it's saying i row updated but when i extract it says null.
Please help me out to solve this problem.
Thanks in advance. -
Unable to load clob data through sql loader
Hi Experts ,
My ctl file is :
LOAD DATA infile '$di_top/conversion/devtrack_notes.csv'
truncate into table xxdi_proj
fields terminated by ','
optionally enclosed by '"'
trailing nullcols (bugid,note *clob*)
{code}
The problem is note column is a clob and one of the
values has line breaks like this :
{code}
Hi Sir,
Would you please inform when the reports are scheduled for automatic process?
Maria will stop his process to avoid duplication.
Please inform asap
With Regards ,
Ronaldinho
{code}
When the data gets loaded ,
The first column gets the sentence 'Would you please inform.....' i.e . the data of second columns gets loaded into first column as nulls are recognized as end delimiter.
How to overcome this problem?
ThanksPl post your exact OS and database versions, along with your complete sqlldr command, the table description and a sample of your input csv file.
HTH
Srini
Maybe you are looking for
-
GOOD NEWS FOR THE NANO!!!
"They claim current iPods can already play video (but this is disabled) which means an updated firmware might enable movie playback, something not infeasible given the power of the iPod hardware platform." http://engadget.com/page/3 -- scroll down
-
XML Payload to Transaction Input
Hi, For clarification, used to be (and still appears to be) that for transaction input properties, data type needed to be 'simple' (ie: string etc), and although we can have transaction input properties of type XML, they still appear in the WSDL as s
-
Hi! I have a problem with reading a byte[] buffer from a file using the FileInputStream: ----- code example ----- File = new FileInputStream(filename); data = new byte[File.available()]; File.read(data); String test = new String(data); ----- end exam
-
MIR7 cannot pick negative transaction
SAP master, In MIR7, user choose credit memo, and then key-in PO reference in the middle screen, but the negative goods receipt (in po history ME23N) cannot be display and cannot be picked-up; only display positive goods receipt. May I know what's wr
-
Do I need to get a New I-phone to get the 3G Edge technology?
I have the original i-phone. I want to get the 3G network. Do I need to buy a new phone or can I just download the new 3G software on my old phone?