Sample Data

In the remainder of this article, we show queries that use each of the preceding approaches. These queries operate on the following table named HOLDINGSXML. This table contains a column named USERID and a column named XMLCOL. For examples showing how to query XML stored as character data, assume that XMLCOL is a CLOB-typed column. For the rest of our examples, which show how to query XML stored in an XML column, assume that XMLCOL is an XML-typed column.

USERID
------
XMLCOL
------
Jonathan
<HOLDINGS>
   <SHARE COMPANY="Amazon.com, Inc." 
          USERID="Jonathan">3000</SHARE>
   <SHARE COMPANY="eBay Inc." USERID="Jonathan">4000</SHARE>
   <SHARE COMPANY="Int'l Business Machines C" 
          USERID="Jonathan">2500</SHARE>
   <SHARE COMPANY="Progress Software"
           USERID="Jonathan">23</SHARE>
</HOLDINGS>
Minollo
<HOLDINGS>
   <SHARE COMPANY="Amazon.com, Inc." 
          USERID="Minollo">3000</SHARE>
   <SHARE COMPANY="eBay Inc." USERID="Minollo">4000</SHARE>
   <SHARE COMPANY="Lucent Technologies, Inc." 
          USERID="Minollo">40000</SHARE>
   <SHARE COMPANY="Progress Software"
           USERID="Minollo">4000000</SHARE>
</HOLDINGS>
...
...

Try DataDirect XQuery® Free!

Put the power, scalability, and performance of DataDirect XQuery® to work for you today! Our free trial lets you see for yourself how easy it is to build data integration applications that access relational, EDI, and other file formats as XML!

Download DataDirect XQuery® today!

Stay Informed!

XQuery is one of the hottest XML technologies being developed today. Stay informed with vital news about standards, tools, and trends by signing up for the DataDirect XQuery® newsletter.