Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQL/Xquery

6 views
Skip to first unread message

punyavee napalai

unread,
Feb 2, 2012, 6:31:08 AM2/2/12
to
Hi

Let say I have the table of 2 fields,
Project >> VCHAR2
XML >> XMLtype (containing XML data)

In my XML field record 1, I have
<Project ID='P01', Title='ABC'>
<Task ID='001'>
</Task>
</Project>

I don't have any content between elements but I would like to know how I can reach to the attribute value in the XMLtype field? For example, I like to write a query to show the Task's ID of the Project ID 'P01'. I have tried EXTRACT(), EXTRACTVALUE() in the SELECT,FROM,WHERE but it doesn't work.

Your help would be very appreciated, thank you very much.


0 new messages