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 XMLTABLE returns null rows

654806Mar 31 2010 — edited Apr 1 2010
Hello all,

I'm trying a query with XMLTABLE, but even thought the number of returned rows is correct, the row content is (null).

DB version is: 10.2.0.4.0

Here is my query;
SELECT s.DESCRIPTION
FROM EXECUTIONPLAN p,
  XMLTABLE
  ('//executionPlan/executionPlanItems/summary'   
   PASSING p.DATA
   COLUMNS
     DESCRIPTION VARCHAR(250) PATH '/taskId'
  ) s
WHERE
trunc(extractValue(data, '/executionPlan/executionPlanHeader/statusChanged')) = to_date('2010-03-05','YYYY-MM-DD');
Sorry the XML content is quite big -50k lines at average- so can't post the whole XML, but to give an idea;
/executionPlan
   /executionPlan
      /executionPlanHeader
         /statusChanged
         /x
         /y
         ...
      /executionPlanItems
         /summary
            /taskId
            ...
         /summary
         /summary
         ...
The result looks like;
1 (null)
2 (null)
3 (null)
4 (null)
...
Suggestions are very much appreciated :)

Cheers
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 29 2010
Added on Mar 31 2010
7 comments
2,719 views