This site is hosted and sponsored by hyve.com specialists in Cloud Hosting UK and VMware Hosting. If you are interested in our services please call us for chat on 0800 612 2524
If you are querying the XML datatype you can query nodes using the sql below:
select
cast(DOC as xml).query('//trade_id/text()') as trade_id,
cast(DOC as xml).query('//cdr/text()') as cdr,
cast(DOC as xml).query('//type_instrument/text()') as 'type_instrument',
cast(DOC as xml).query('(//product/@type)[0]') as '@type'
from Deals
You may receive this error if you try to query an attribute.
Attribute may not appear outside of an element
Use the data() function to query attributes and resolve this problem
cast(DOC as xml).query('data(//product/@type)') as '@type'
Back to SQL Server
Add new attachment
Only authorized users are allowed to upload new attachments.
«
This page (revision-1) was last changed on 08-Jan-2009 14:16 by Hyve Support