Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query with extractValue()

420739May 20 2004 — edited May 20 2004
Hello,

I have the following XML-Document:

<ExampleXML>
<Order OrderNr="1500">
<Customer CustomerNr="781">
<Name>Burns</Name>
</Customer>
</Order>
<Order OrderNr="2479">
<Customer CustomerNr="575">
<Name>Simpson</Name>
</Customer>
</Order>
</ExampleXML>

I store this document in a table of XMLTYPE.
Now I want to perform the following query:

SELECT x.extract('//ExampleXML/Order/@OrderNr').getStringVal()
FROM myXMLTabelle x
where x.extract('//ExampleXML/Order/Customer/Name/text()').getStringVal() = 'Burns';

But there is no result, because the extract-function in the where-clause returns "BurnsSimpson".

Isn't it possible to execute such queries?
Is there another way to achieve my aim?

Thanks,

Torsten
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2004
Added on May 20 2004
1 comment
375 views