You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Anderson, Rob (Global Trade)" <Ro...@nike.com> on 2005/06/15 23:52:05 UTC

RE: Oracle, SQL Task, and XML

The sql task does not support all the same stuff that you might find in sqlplus. The query is run via jdbc driver. This may be the cause of the descrepency between what you see using ant and what you see using sqlplus.

-Rob A

> -----Original Message-----
> From: Renick, Garrel [mailto:garrel@more.net]
> Sent: Wednesday, June 15, 2005 7:33 AM
> To: user@ant.apache.org
> Subject: Oracle, SQL Task, and XML
> 
> 
> 
> I'm trying to get an XML result set from an Oracle 9i server 
> using ANT's
> SQL task with the Oracle JDBC Thin Driver. I can successfully 
> connect to
> the database and issue standard SQL through the ANT SQL task 
> and get the
> expected result set. However, if I issue SELECT statements 
> with Oracle's
> XML-related functions, the output file for the results contains values
> that do not match those returned by Oracle's SQLPlus command line
> interpreter. I'm not an Oracle guy, so any insight into what 
> my problem
> may be would be appreciated.
> 
> Here's my query:
> 
> SELECT XMLELEMENT("Document") FROM some_view@some_server where
> rownum<10;
> 
> Oracle's SQLPlus returns these results:
> 
> XMLELEMENT("DOCUMENT")
> -------------------------------
> 
> <Document></Document>
> <Document></Document>
> <Document></Document>
> <Document></Document>
> <Document></Document>
> <Document></Document>
> <Document></Document>
> <Document></Document>
> <Document></Document>
> 
> 9 rows selected.
> 
> 
> The same query from ANT's SQL task returns this:
> 
> XMLELEMENT("DOCUMENT")
> null
> null
> null
> null
> null
> null
> null
> null
> null
> 
> 0 rows affected
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org