Another XML - SQL Question
Hi, I have the following code which is extracting data to XML format. I have on problem with null values though and I think its because of the way I have set up this script. Can anyone suggest a way to solve this? Also does anyone know where I could find XML documentation for Oracle DB version 8.1.7?
SQL> DECLARE
qryCtx DBMS_XMLGEN.ctxHandle;
result CLOB;
xmlstr VARCHAR2(32767);
line VARCHAR2(2000);
BEGIN
qryCtx := dbms_xmlquery.newContext('Select empno category_1, ename Category_2, job Category_3 from scott.emp where rownum <= 3');
dbms_xmlquery.useNullAttributeIndicator(qryCtx, FALSE);
dbms_xmlquery.setRowsetTag(qryCtx, 'field-info');
dbms_xmlquery.setrowtag(qryCtx, 'Field');
dbms_xmlquery.setDataHeader(ctxHdl => qryCtx,header => ' ', tag => 'instance') ;
result := dbms_xmlquery.getXML(qryCtx);
DBMS_XMLQuery.closeContext(qryCtx);
xmlstr := dbms_lob.SUBSTR(result, 32767);
LOOP
EXIT WHEN xmlstr IS NULL;
line := SUBSTR(xmlstr, 1, INSTR(xmlstr, CHR(10)) - 1);
DBMS_OUTPUT.PUT_LINE(line);
xmlstr := SUBSTR(xmlstr, INSTR(xmlstr, CHR(10)) + 1);
END LOOP;
END;
Here is a sample of the output
/<?xml version = '1.0'?>
<instance>
<field-info>
<Fieldnum="1">
<CATEGORY_1>7369</CATEGORY_1>
<CATEGORY_2>SMITH</CATEGORY_2>
<CATEGORY_3>CLERK</CATEGORY_3>
</Field>
<Fieldnum="2">
<CATEGORY_1>7369</CATEGORY_1>
<CATEGORY_2>SMITH</CATEGORY_2>
</Field>
As you can see Category 3 is not on the second piece of output. Is there anyway I can force Category 3 to appear even if it is null? So it would look like:
<Fieldnum="2">
<CATEGORY_1>7369</CATEGORY_1>
<CATEGORY_2>SMITH</CATEGORY_2>
<CATEGORY_3></CATEGORY_3>
</Field>
Sorry about the formatting of the code, I seem to lose the spacing when I post the message.
thanks,
Ian
Hi,
Can u try using an NVL or decode in the query,try to pass space or sometiing?Just a thought, dont know whether it will work for ur requirement?
Thanks
George
Similar Messages
-
Hi,
Is the XML SQL Utility able to store XML document that contains
attributes into the database ? If so, how ? And can it also
store document whose hierachy has many levels? I couldn't find
those information in the XML SQL documentation.
Thanks.
Kevin
nullHi Kevin,
XMLSQL Utility, today, can load xml documents that contain
attributes, but the attributes are ignored. Let me know in more
detail what are you trying to do, and maybe I can give you a
workaround.
Kevin Lu (guest) wrote:
: Hi,
: Is the XML SQL Utility able to store XML document that contains
: attributes into the database ? If so, how ? And can it also
: store document whose hierachy has many levels? I couldn't find
: those information in the XML SQL documentation.
: Thanks.
: Kevin
Oracle Technology Network
http://technet.oracle.com
null -
Another simple SQL question?
Can someone help me (an SQL novice) optimize this query?
Assume a table TRANS with four columns ACCOUNT, PURCHASE_DATE,
ITEM_NUMBER, and QUANTITY. (Fairly self evident names, I hope.)
I want to create a view that returns the most recent purchase
date for each account, and the sum of all items purchase on that
date.
The following works, but involves a sub-query, which I think
must be inefficient (the real table I'm working with has about
20 million rows, returning about 1 million rows and takes
hours!):
select unique a.account,
purchase_date,
sum(quantity)
from TRANS a,
(select account,
max(purchase_date) as cdate
from TRANS
group by account) b
where a.account = b.account and
a.purchase_date = b.cdate
group by a.account;
A second, similar query is to find the most recent purchase
date, by account, for each item, and the total quantity of that
item purchased on that date. But, hopefully, an answer to the
first question will lead me in the right direction.
Thanks!
BobHere is another batch of queries to test. The one on top is the
only one that is drastically different from your query or
anything that David already suggested.
SELECT account,
purchase_date,
total
FROM (SELECT account,
purchase_date,
SUM (quantity) total,
RANK () OVER
(PARTITION BY account
ORDER BY purchase_date DESC)
AS rk
FROM trans
GROUP BY account, purchase_date)
WHERE rk = 1
ORDER BY account
SELECT a.account,
a.purchase_date,
SUM (quantity) total
FROM trans a,
(SELECT account,
MAX (purchase_date) cdate
FROM trans
GROUP BY account) b
WHERE a.account = b.account
AND a.purchase_date = b.cdate
GROUP BY a.account, a.purchase_date
ORDER BY a.account
SELECT account,
purchase_date,
SUM (quantity) total
FROM trans a
WHERE NOT EXISTS
(SELECT 0
FROM trans b
WHERE b.account = a.account
AND b.purchase_date > a.purchase_date)
GROUP BY account, purchase_date
ORDER BY a.account
SELECT a.account,
a.purchase_date,
SUM (quantity) total
FROM trans a
WHERE a.purchase_date =
(SELECT MAX (b.purchase_date)
FROM trans b
WHERE b.account=a.account)
GROUP BY a.account, a.purchase_date
ORDER BY a.account
SELECT a.account,
a.purchase_date,
SUM (quantity) total
FROM trans a
WHERE (a.account, a.purchase_date) IN
(SELECT b.account,
MAX (b.purchase_date)
FROM trans b
GROUP BY b.account)
GROUP BY a.account, a.purchase_date
ORDER BY a.account
SELECT a.account,
a.purchase_date,
SUM (quantity) total
FROM trans a
WHERE a.purchase_date =
(SELECT /*+ INDEX_DESC (b my_index) */
b.purchase_date
FROM trans b
WHERE b.account = a.account
AND ROWNUM = 1)
GROUP BY a.account, a.purchase_date
ORDER BY a.account -
Hi!
I am trying to reuse a code in JDeveloper to get XML from a query. I have copied the code from a method and created a new method with the copied code and changed it. The problem is that when I run the old code I now get following error:
Ett oförväntat fel har inträffat: Application: FND, Message Name: FND_GENERIC_MESSAGE.
Tokens: MESSAGE = oracle.xml.sql.OracleXMLSQLException: Det här objektet har stängts.
Vill du inte att objektet ska stängas automatiskt mellan anropen kan du granska metoden 'keepObjectOpen()'.;
This means in english something like:
An unexpected error accoured: Application: FND, Message Name: FND_GENERIC_MESSAGE = oracle.xml.sql.OracleXMLSQLException: This object is closed. If you don't want the object to close automatically between calls you can check method 'keepObjectOpen()';
the code I'm running is:
public String punchoutSomething()
throws Exception
StringBuffer sqlForXml =new StringBuffer("select pv.*"
+", cursor(select * from XXPOS_PUNCHOUT_TABLE2 c where c.vendor_id=pv.vendor_id) as contacts"
+" from XXPOS_PUNCHOUT_TABLE1 pv where vendor_id in (");
// add all ids
SuppSummVOImpl vendorView = getSuppSummVO();
Row row;
int punchoutCnt=0;
// vendorView.reset();
Row[] selectedRows = vendorView.getFilteredRows("SelectStatus","Y");
for(int i=0;i<selectedRows.length;i++)
if(punchoutCnt>0)
sqlForXml.append(",");
sqlForXml.append(((Number)selectedRows.getAttribute("VendorId")).toString());
punchoutCnt++;
if(punchoutCnt==0)
sqlForXml.append("-1"); // make sql valid, will not return rows
sqlForXml.append(")");
// System.out.println(sqlForXml); // DEBUG
OADBTransaction tx = (OADBTransaction)getOADBTransaction();
OracleXMLQuery xq = new OracleXMLQuery( tx.getJdbcConnection()
, sqlForXml.toString()
xq.setRaiseException(true); // in case of error raise an exception (default
// is to generate an error document
xq.setEncoding("UTF-8"); // not necessary?
xq.useLowerCaseTagNames();
xq.setRowsetTag("vendors");
xq.setRowTag("vendors_row");
//System.out.println(xq.getXMLString()); // DEBUG
XMLDocument suppl = (XMLDocument)xq.getXMLDOM();
XSLProcessor xslt = new XSLProcessor();
InputStream sheetStream = this.getClass().getResourceAsStream("mystylesheet.xsl");
if(sheetStream==null)
throw new Exception("Could not load stylesheet");
XSLStylesheet sheet = xslt.newXSLStylesheet(
sheetStream
StringWriter serialize = new StringWriter();
xslt.processXSL(sheet,suppl,new PrintWriter(serialize));
String returnXML = serialize.getBuffer().toString();
// System.out.println("X:"+returnXML); // DEBUG
sheetStream.close();
return returnXML;
===================
i've copied the same code into another method and only changed the sql-statment to be used and the stylesheet to use to transform the xml. Is something wrong with that?
Another question: if the xsl refers to a xsd but wihtout any path where should it be?
Thanks for the help,
PatriciaActually, having looked at Metalink, seems that although this message may be accurate and correct,
it has been 'introduced' as part of the 9i JDBC driver.
So, I used the 8i JDBC driver I happened to have instead and that worked fine. -
XML SQL Utility, Unicode
Hi,
I have some questions to the XML-SQL-Utility:
1.) Is there a bug in the oracle.xml.sql.query class:
OracleXMLQuery qry = new OracleXMLQuery(conn,"select POSITION from DATAS");
qry.setRowTag("DROW");
OracleXMLDocGenDOM gdoc = new OracleXMLDocGenDOM();
qry.getXML(gdoc);
conn.close();
Document docin = gdoc.getXMLDocumentDOM();
NodeList rows = docin.getDocumentElement().getElementsByTagName("DROW");
// The Node "DROW" wasn't found.
// It work if I do it below
NodeList rows = docin.getDocumentElement().getElementsByTagName("ROW");
// It doesn't matter what is set in the "qry1.setRowTag("DROW");"
(I use the sun parser)
2.) I have a problem by insertXML(Document);
I will insert a Document with a structure as below in my database:
<?xml version="1.0" encoding="UTF-16"?>
<ROOTDOC>
<ROW>
<DOCUMENTREF>133-12224</DOCUMENTREF>
<TEXT>hello</TEXT>
</ROW>
<ROW>
<DOCUMENTREF>133-124</DOCUMENTREF>
<TEXT>world</TEXT>
</ROW>
</ROOTDOC>
XmlDocument sdoc = new XmlDocument();
Element rootDEl = sdoc.createElement("ROOTDOC");
sdoc. appendChild(rootDEl);
Element rowEl = sdoc.createElement("ROW");
Element docREl = sdoc.createElement("DOCUMENTREF");
docREl.appendChild(sdoc.createTextNode("133-12224"));
NodeList rows = sdoc.getDocumentElement().getElementsByTagName("ROW");
int size = rows.getLength();
System.out.println("SIZE: " size "\n");
// The size is null, what's wrong ?
OracleXMLSave save = new OracleXMLSave(conn, tabName);
int rowCount = save.insertXML(sdoc);
// It didn't insert something in my table !
3.) I save Unicode UTF-16 in my database with the XML SQL Utility:
<?xml version="1.0" encoding="UTF-16"?>
<ROOTDOC>
<ROW>
<TEXT>D$55DD</TEXT>
</ROW>
<ROW>
<TEXT>tt%zu||</TEXT>
If I read it whit the oracle.xml.sql.query, it is Unicode UTF-8:
OUTPUT IS:
<?xml version="1.0"?>
<ROOTDOC>
<ROW num="1">
<TEXT>D$55--</TEXT>
</ROW>
<ROW num="2">
<TEXT>tt%zu33</TEXT>
</ROW>
I want a output as the input (Unicode UTF-16).
Can anyone please advise on the problems.
Thanks
nullHi H.Ozawa,
thanks for trying but non of the solution helped me, sorry.
Question 1:
I'll try it again like this:
OracleXMLQuery qry = new OracleXMLQuery(conn,"select POSITION from DATAS");
qry.setRowTag("DROW");
Document docin = qry.getXMLDOM();
conn.close();
NodeList rows = docin.getDocumentElement().getElementsByTagName("DROW");
// The Node "DROW" wasn't found.
Question 2:
<?xml version="1.0" encoding="UTF-16"?>
<ROOTDOC>
<ROW>
<DOCUMENTREF>133-12224</DOCUMENTREF>
<TEXT>hello</TEXT>
</ROW>
<ROW>
<DOCUMENTREF>133-124</DOCUMENTREF>
<TEXT>world</TEXT>
</ROW>
</ROOTDOC>
XmlDocument sdoc = new XmlDocument();
Element rootDEl = sdoc.createElement("ROOTDOC");
sdoc. appendChild(rootDEl);
Element rowEl = sdoc.createElement("ROW");
Element docREl = sdoc.createElement("DOCUMENTREF");
docREl.appendChild(sdoc.createTextNode("133-12224"));
Element docTEl = sdoc.createElement("TEXT");
docTEl.appendChild(sdoc.createTextNode("hello"));
An error message occur:
java.lang.reflect.InvocationTargetException: java.lang.IllegalAccessError: try to access class com/sun/xml/tree/ParentNode from class project/dbase/xmlwritedb at project.dbase.xmlwritedb.main(xmlwritedb.java:33)
at java.lang.reflect.Method.invoke(Native Method)
at com.borland.jbuilder.util.BootStrap.invokeMain(Unknown Source)
at com.borland.jbuilder.util.BootStrap.main(Unknown Source)
Question 3:
I try it like below but the output is "UTF-8" encoding
OracleXMLDocGenDOM gdoc = new OracleXMLDocGenDOM();
query.getXML(gdoc);
XMLDocument docin = (XMLDocument)gdoc.getXMLDocumentDOM();
docin.setEncoding("ISO-8859-1"); //docin.setEncoding("UTF-16");
NodeList rows = docin.getDocumentElement().getElementsByTagName("ROW");
Element row = (Element)rows.item( i );
NodeList elements = row.getElementsByTagName( "DOCUMENTREF" );
So you or someone have another idea to fix this problems.
Thanks
null -
Pooling data from an XML file to another XML file using File Adapter
Hi,
I am trying to Pool data from an XML file to another XML file using File Adapter. I have added "Target Namespace" in both the XML and XSD.The problem is "At the destination given in the FileAdapter" only a blank XML file is created and it doesnot have any data.
Kindly suggest me some methods
Thanks in Advance.Ok here is a solution with external tables.
SQL> CREATE DIRECTORY my_xml_dir AS 'E:\oracle\Log_files\UTL_AKIVATST'
2 /
Directory created.
SQL> DROP TABLE my_xml_et
2 /
Table dropped.
SQL> CREATE TABLE my_xml_et
2 ( EMPNO NUMBER,
3 EMPNAME VARCHAR2(10),
4 JOB VARCHAR2(10),
5 HIREDATE DATE,
6 SAL NUMBER
7 )
8 ORGANIZATION EXTERNAL
9 (
10 TYPE ORACLE_LOADER
11 DEFAULT DIRECTORY my_xml_dir
12 ACCESS PARAMETERS
13 (
14 records delimited by "</EMP>"
15 badfile my_xml_dir:'empxt%a_%p.bad'
16 logfile my_xml_dir:'empxt%a_%p.log'
17 FIELDS
18 (
19 filler char(2000) terminated by "<EMP>",
20 EMPNO char(2000) enclosed by "<EMPNO>" and "</EMPNO>",
21 EMPNAME char(2000) enclosed by "<ENAME>" and "</ENAME>",
22 JOB char(2000) enclosed by "<JOB>" and "</JOB>",
23 HIREDATE char(2000) enclosed by "<HIREDATE>" and "</HIREDATE>",
24 SAL char(2000) enclosed by "<SAL>" and "</SAL>"
25 )
26 )
27 LOCATION ('emp.xml')
28 )
29 PARALLEL
30 REJECT LIMIT UNLIMITED
31 /
Table created.
SQL> SELECT * FROM my_xml_et
2 /
EMPNO EMPNAME JOB HIREDATE SAL
7369 SMITH CLERK 17-DEC-80 800
7499 ALLEN SALESMAN 20-FEB-81 1600
This is the XML file i used emp.xml
<EMPLOYEES>
<EMP>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
<HIREDATE>17-DEC-80</HIREDATE>
<SAL>800</SAL>
</EMP>
<EMP>
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<JOB>SALESMAN</JOB>
<HIREDATE>20-FEB-81</HIREDATE>
<SAL>1600</SAL>
<COMM>300</COMM>
</EMP>
</EMPLOYEES>
Use this external table to insert into your table.
Thanks,
Karthick. -
Help Needed -- Oracle XML/SQL utility and PL/SQL parser
Let's say we have an xml file
<?xml version="1.0" standalone="no"?>
<abc>
<def>
<ghi>test</ghi>
</def>
<jkl>
<mno>testing</mno>
</jkl>
</abc>
We can store the <def> tag in one table say def and <jkl> tag in another table say jkl.
Is there a way to combine def and jkl and insert in one table so that there in one row with two columns test and testing??
nullHi,
Are u sure that it is a java enabled database? The most common
case of failure with the xmlgen package is because the loadjava
command did not succeed.
Please make sure that oraclexmlsqlload.bat file loaded all the
java procedures successfully. If not then u would have to java-
enable your database by running the initjvm script. (please see
the docs).
Thx
Murali
Iveta Vojtko (guest) wrote:
: Hi,
: I have downloaded XML SQL Utility for Java against Oracle
8.0.5
: on WindowsNT. The xmlgen package was created successfully but
: its body is invalid and my PL/SQL test has failed because of
: following error: PLS-00103: Encountered the symbol "NAME"
: when expecting one of the following: := . ( @ % ; not null
range
: renames default character. The symbol ":= was inserted abefore
: "NAME" to continue.
: Is it because I am not using Oracle8i? I just want to use the
: server side of XML SQL. Please, reply asap. Thank you.
Oracle Technology Network
http://technet.oracle.com
null -
Is XML-SQL Utility for Java run on Client Side?
A question about the XML-SQL Utility for Java
When a client program connect to a Oracle database (the clinet program and Oracle DB is run on two different machine. Oracle 8i is used) and use the oracle.xml.sql.query.OracleXMLQuery Class (form the XSU) to generate XML by given a SQL query. I want to know the transforation process is execute in the Clinet side or the database?
Is there any method that i can retrieve the XML directly from the database rather then doing the transformation form the Client side?Set JDK_HOME to the directory where you install your JDK (Java Development Kit).
So instance, I've install JDK1.1.8 on my
C drive so
set JDK_HOME=c:\jdk1.1.8;c:\jdk1.1.8\bin -
Where is the oracle.xml.sql.query package?
Hi,
I have downloaded the xmlparser_v2_0_2_9.zip. I hoped I have everything to compile the example for retrieving XML document with an sql query. However, the jar file is missing the entire package oracle.xml.sql.query which contains for instance the crucial class OracleXMLQuery. Does anyone know where I could get this package - is it part of another download that I have to do, or can I buy it anywhere? Thanks for your help.
KarelIt's part of the XML SQL Utility for Java, avialable for download from http://technet.oracle.com/tech/xml
-
Fetch data from another mirosoft sql server to sap
Dear all,
I want to fetch data from another mirosoft sql server
to SAP(my sap server IN unix, oracle 10g).
Thanks
Shashi
Moderator Message: Try to do you own research before posting your question. Get back to the forums in case you are stuck with any issue
Edited by: Suhas Saha on Jul 26, 2011 3:21 PMhi,
u should see following documentation:
Oracle9i Heterogeneous Connectivity Administrator's Guide
Release 1 (9.0.1)
Part Number A88789_01
in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
regards
umar -
Updating a database using XML SQL Utility
Hi all,
It seems that the Oracle XML SQL Utility provides only to insert rows into a table/view. However, if one wants to update a table from an XML no support is available.
How does one proceed if this is to be achieved?
Thanks in advance.
Regards,
Manoj
nullWhile inserting i get a
oracle.xml.sql.OracleXMLSQLException and further a
NumberFormatException. Which parameter do I have to set to avoid
these Exceptions. I can insert the file in my local db but I get
the Exception on the server db. The value I want to insert for
expample is 30,1. Maybe the JDBC-Driver tries to convert the String ;30,1+ to an
Integer-Object. This will cause the described Exception since
the Integer-Class requires ;.+ instead of ;,+ for decimal point.
I have another problem generating an xmlfile when there
are "Umlaute" in the data. E.g. V and \. Exchanging these to Oe
and Ue than it works fine.Use ISO-8859-1 character set to work with umlauts, e.g.:
<?xml version = '1.0' encoding = 'ISO-8859-1'?>
.. but you can use the default UTF-8 encoding too, umlauts will
be replaced by equivalents as ;CŸ+
Alex -
Hi,
Any ideas or code samples of how we could use the XML SQL Utility
to do a tree structure, like the following:
<GROUP id="grp1">
<ITEM> item 1 </ITEM>
<ITEM> item 2 </ITEM>
<GROUP id="grp2">
<ITEM> item 3 </ITEM>
<ITEM> item 4 </ITEM>
</GROUP>
<ITEM> item 5 </ITEM>
</GROUP>
Thanks,
Cyril.
nullHi Mark,
To a certain extent one can modify the xml generated by
manipulating the query and by using some of the tag name
customizations which the XSU allows. Unfortunately, what you
want to create will take more than that; you will have to use
XSLT - xml transformation language, part of XSL. You will find
and XSL processor packaged with the oracle xml parser v2 (see
oraxsl). You can find more info on XSLT at www.w3c.org
Mark Fortner (guest) wrote:
: I have an example similar to his:
: Given a resultset in the form:
: Company Department User
: Oracle XML Dev John Smith
: Oracle XML Dev Jane Smith
: Oracle Mgmt Larry Ellison
: Sun Project X Jane Doe
: Sun Mgmt Scott McNealy
: which usually results in XML like this
: <rowset>
: <row id=1>
: <Company>Oracle</Company>
: <Department>XML Dev</Department>
: <User>John Smith</User>
: </row>
: </rowset>
: how do I get it to look like this?
: <JTree>
: <Oracle>
: <XML Dev>
: <Jane Smith/>
: <John Smith/>
: </XML Dev>
: <Mgmt>
: <Larry Ellison/>
: </Mgmt>
: </Oracle>
: <Sun>
: <Project X>
: <Jane Doe/>
: </Project X>
: <Mgmt>
: <Scott McNealy/>
: </Mgmt>
: </Sun>
: </JTree>
: Oracle XML Team wrote:
: : Hi Cyril,
: : Your question is a bit vague. Do you have a table which
you
: : are trying to query and get the result in the following
: format?
: : If these is the case please give me the description of the
: table
: : or the view.
: : The other thing to keep in mind is that even if the XSU
: can't
: : give you the XML data in the exactly the format you want, you
: can
: : always use XSLT to transform the XML doc generated by the XSU
: to
: : the desired XML doc.
: : Cyril Dunnion (guest) wrote:
: : : Hi,
: : : Any ideas or code samples of how we could use the XML SQL
: : Utility
: : : to do a tree structure, like the following:
: : : <GROUP id="grp1">
: : : <ITEM> item 1 </ITEM>
: : : <ITEM> item 2 </ITEM>
: : : <GROUP id="grp2">
: : : <ITEM> item 3 </ITEM>
: : : <ITEM> item 4 </ITEM>
: : : </GROUP>
: : : <ITEM> item 5 </ITEM>
: : : </GROUP>
: : : Thanks,
: : : Cyril.
: : Oracle Technology Network
: : http://technet.oracle.com
Oracle Technology Network
http://technet.oracle.com
null -
Best way to Transform one XML to another XML using SSIS
I am using Altova Mapforce tool to transform one XML into another XML, but now we are planning to use any other best way of using XSLT transformation. Could you guys shed me some light on different approaches and which one would be best based on time and
cost constraint.
In Altova Map force Tool, due to below reasons we wanted to avoid that,
Resource cannot work parallely in single XSLT
Maintanence is very difficult
Licensed version of tool
When the XML size grows, new resourse are feeling difficult to edit the XSLT etc.,
Related to .net approaches would be best.
Can we create XSLT by using SSIS to transfrom one xml into another xml format.
In .net code we can do, but feel that it is time consuming due to large size of XML.
Any other best way for handling XSLT transformation or any toolXSLT can be applied to an XML file fed as a source, but it does not resolve #1. I by the way do not understand this point, technically.
For SSIS to go live in prod you need to deplete a SQL Server license (CPU + CALs).
The time to transform in SSIS will be equal to doing in .net code as the whole SSIS is coded in .Net, too.
Here, in this section of the forum we may not have the needed expertise in XSLT or XML transformations.
In my IT life, XML transformations were done in Java if on a *NIX box. On Windows a C# .net app webservice did it. The most interesting implementation, and if you are a heavy users of XML is to use a dedicated database as Base X, it has an XLSLT transform
moduleL http://docs.basex.org/wiki/XSLT_Module
Arthur
MyBlog
Twitter -
Re: usage of XML SQL Utility
Hi there,
I have such a design issue, which I posted a few days ago and I reworded here. Hopefully, I made it clearer this time.
The working scenario, coded in Java, goes like this:
1> Given an XML string, I parse it out and get a set of values for a certain set of elements, say in one ROW.
2> I embed this set of values in the WHERE clause of a query string, do a SELECT.
3> Based on the result from the above SELECT, I do UPDATE, SELECT and INSERT to a few tables.
My question:
Could Oracle XML SQL Utility be used here? If yes, how?
From my reading so far, the Oracle XSU handles the SQL-XML and XML-SQL Mapping very well, in terms of a whole XML string. But, if at some point, I want to break the XML string and get some business logic mingled in it, say a simple calculation, how can I efficiently deal with it?
Any suggestion would be greatly appreciated. Thanks.
---Denali
nullHere are the five choices I see:
[list]
[*] XSU111_ver1_2_1.zip -- to be used with JDBC1.x (JDK1.1.x or later) and loadable into Oracle8.1.5 (486 KB)
[*] XSU12_ver1_2_1.zip -- to be used with JDBC2.0 (JDK1.2.x or later) and loadable into Oracle8.1.6 or later (508 KB)
[*] XSU111_816_ver2_1_0_beta.zip -- to be used with JDBC1.0 and JDK1.1.8 (486 KB)
[*] XSU12_816_ver2_1_0_beta.zip -- to be used with JDBC2.0 (JDK1.2.x or later) and loadable into Oracle8.1.6 (486 KB)
[*] XSU12_ver2_1_0_beta.zip -- to be used with JDBC2.0 (JDK1.2.x or later) and loadable into Oracle8.1.7 or later (508 KB)
[list] -
Hi,
I am trying to load OracleXMLSQL utility into the Oracle 8.1.5
database from our SUN box, but for some reason, I get the
following error message:
"SQL Error while connecting with oci8 driver to ....could not
open connection"
(I have had the USER_PASSWORD set to the right name. sqlplus
connects fine with USER_PASSWORD)
Any pointers ??
Thanks,
-Sandeep.
nullOracle Team, it is a month since I posed the question. Do U mind
replying ???
I am using XML SQL Utility on OAS server using Java. The code
compiled fine and displays perfect results using the command
line(on the server), but when I call the program thru browser
using OAS4.0 server, it starts to download a file which has the
following text in it:
Exception caught..!
... /oracle.xml.sql.query.OracleXMLQuery.class
Can U please explain this behavior, and advise on what need to be
done to overcome it ??
-Sandeep.
Sandeep Khanna (guest) wrote:
: Hi,
: Thanks for your reply. I don't understand why I got the error.
: Downloading the utility again, and running it worked without
: problems.
: Now, I can see the results on the UNIX box by using: "java
<class
: name>"
: But, when I call the program thru browser using OAS4.0 server,
it
: starts to download and has the following in the downloaded
file:
: Exception caught..! <path of my
: classfile>/oracle.xml.sql.query.OracleXMLQuery.class
: Any ideas/suggestions ??
: -Sandeep.
: Oracle XML Team wrote:
: : Hi Sandeep,
: : where is the error being raised? During loading? (i.e. when
: : running oraclexmlsqlload.csh?) Or is it when using
: : " java OracleXML " ?
: : The primary cause for this could be that the database is not
: up
: : and running. The second cause could be that the ORACLE_SID
and
: : ORA_SID is not set to the right values.
: : If you are having problems with running the client side
"java
: : OracleXML" then u need to supply the user name and password
: thru
: : the parameter, java OracleXML getXML -user
: "username/password"...
: : Hope this helps,
: : Oracle XML team
: : Sandeep Khanna (guest) wrote:
: : : Hi,
: : : I am trying to load OracleXMLSQL utility into the Oracle
: 8.1.5
: : : database from our SUN box, but for some reason, I get the
: : : following error message:
: : : "SQL Error while connecting with oci8 driver to ....could
not
: : : open connection"
: : : (I have had the USER_PASSWORD set to the right name.
sqlplus
: : : connects fine with USER_PASSWORD)
: : : Any pointers ??
: : : Thanks,
: : : -Sandeep.
: : Oracle Technology Network
: : http://technet.oracle.com
null
Maybe you are looking for
-
R3 to BW InfoObject Mapping - in report form
I have had several requests by my users for a Bex report that gives them the R3 to BW InfoObject mapping of the InfoObjects they see in the Cubes and ODS's they report from. I am familiar with the R3 table RODCHA and the BW tables RSOSFIELDMAP, RSDI
-
Sound plays through Matrox MX02 instead of Komplete Audio 6 USB Device =(
In Adobe Premire Pro CC I can't use my NI Komplete Audio 6 usb device for playback. Instead sound always comes out of my Matrox MX02 when I'm scrubbing or playing. Under Preferences -> Audio Hardware -> Default Device I have selected Komplete Audio 6
-
Effective solution for algorithm
I have table T defined below. 1. Table t definition. with t as (select 'A' CODE from dual union all select 'A' CODE from dual union all select 'B' from dual) select * from t;1) In plsql code i have to return cursor ("o_cur") over table t, that i can
-
Graphs in ABAP - possibilities ?
Hi Guys, Printing the graph in ABAP is a possibility.BUt how about printing graphs in 1) Smartforms - how to print graphs in smartforms 2) Adobeforms ? Any idea....please let me know. Regards, Sandip.
-
Commas in company name cause emailing problems with Entourage
If I have a comma in a company name, such as "ABC Company, Inc.", emails won't be sent as Entourage sees the name before the comma as on email address and the "Inc." as a separate email address. Any ideas how to fix other than taking out all the comm