Skip to Content

Read XMLTYPE from Oracle table

Anyone has success reading Oracle data type XMLTYPE.

select all query returns all other columns but the XMLTYPE column is blank

MII - 12.1.9

Thanks

Ajay

Edited by: Ajay Malempati on Dec 8, 2011 10:50 AM

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 08, 2011 at 05:07 PM

    Have you tried doing a TO_CHAR(XMLColumn) AS StringXMLColumn on the column to see if string conversion does the trick?

    Add a comment
    10|10000 characters needed characters exceeded

    • Wow ..

      Thank you for the tip Pedro .. Aliasing the table name worked

      I was trying ..

      SELECT

      TABLENAME.YOURXMLCOLUMN.extract('*').getStringVal() as myXMLColumn

      FROM

      TABLENAME

      Got the following error.

      Error is java.sql.SQLException: ORA-00904: "TABLENAME"."YOURXMLCOLUMN"."EXTRACT": invalid identifier ..

      Tip: Alias table name in the query.

      Thank you

      Ajay.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.