I have written an interface to interact with the CubeIQ BlackBox (www.magiclogic.com) and I have an SQL Server 2005 database table where I store some regular text fields, dates, and two pieces of XML in columns that have an XML data type.
There are a few values I want to pick out of the XML, and I cannot figure out how to query the XML, or the attributes of nodes within that XML.
Here is the type of query I want to do:
SELECT
[regular_table_field1],
[regular_table_field2],
[opt_resposne_xml].rootnode.wrapper.child@attr('someattribute') AS 'someattribute',
[opt_resposne_xml].rootnode.wrapper.child@attr('someattribute2') AS 'someattribute2'
FROM [optimizations] WHERE [opt_concept_id] = '1234'