OCI:21500 error when querying for XML

S8chem

Member
I get this error OCI:21500 when running a query that will return results formatted as XML. The target database is Oracle 9i.

Using SQL+ I can get the information I need although it appears without the XML formatting.

Is there a patch or workaround for getting this functionality to work with PL/SQL developer?

Thanks.
 
Originally posted by mkalter:
What exactly is the query that you are executing?


The query is: SELECT XMLELEMENT ( "Emp",
XMLATTRIBUTES (e.id,e.fname | |' ' | | e.lname AS "name")) AS "result"
FROM employees e

The employee table defines 3 fields: lname, fname and id.
 
This query results in an XMLTYPE result, which is not supported by Oracle Net 9.0 and earlier. You can view the XML result by using the getclobval() function:
Code:
SELECT XMLELEMENT ("Emp",
  XMLATTRIBUTES (e.id,e.fname | | ' ' | | e.lname AS "name")).getclobval() AS "result"
FROM employees e

------------------
Marco Kalter
Allround Automations
 
Originally posted by mkalter:
This query results in an XMLTYPE result, which is not supported by Oracle Net 9.0 and earlier. You can view the XML result by using the getclobval() function:
Code:
SELECT XMLELEMENT ("Emp",
  XMLATTRIBUTES (e.id,e.fname | | ' ' | | e.lname AS "name")).getclobval() AS "result"
FROM employees e

That did it. Thanks for the help.
 
Back
Top