Database Reference
In-Depth Information
, G.GENRE "Genre")
, XMLFOREST(CD.PRESSED_DATE "Released"
, CD.LIST_PRICE "Price")
, XMLELEMENT("Song", XMLATTRIBUTES(S.TITLE "Title"
, T.TRACK_SEQ_NO "Track")
, XMLFOREST(S.RECORDING_DATE "Recorded"
, TRIM(S.PLAYING_TIME) "Length")
))).GETSTRINGVAL()
FROM ARTIST A
JOIN SONG S ON(S.ARTIST_ID = A.ARTIST_ID)
JOIN CDTRACK T ON(T.SONG_ID = S.SONG_ID)
JOIN MUSICCD CD ON(CD.MUSICCD_ID = T.MUSICCD_ID)
JOIN GENRE G ON(G.GENRE_ID = CD.GENRE_ID);
Now we need to look at the detail of the XML produced in Figure
17.10. Exchanging the GETSTRINGVAL() function with the
EXTRACT('/*') function and the command SET LONG <lots> (the
default is 80) will create a beautified picture of XML. We will get to that
Figure 17.10
The Complex Join
in Figure 17.9 in
XML.
 
Search WWH ::




Custom Search