SQL Language (MOSC)

MOSC Banner

pivot xml

edited Jan 17, 2011 12:28PM in SQL Language (MOSC) 2 commentsAnswered
 How do you query the output from the 'pivot xml' sql?
Just as an example, How can you query the output(xmltype) from this sql so that it is flattened into a relational type view?
select *
  from ( select owner, count(*) as owner_segment_count
          from  dba_segments
         where  owner in( 'OLAPSYS','ORDSYS','QDATA','SYS','SYSMAN','SYSTEM','XDB' )
         group by owner )
  pivot xml( sum( owner_segment_count ) as owner_segment_count for owner in( any ) )

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center