Hello,
I am new to formal XML and the new XML columns in Sql Server 2005. I have
done some reading on it and have tried to create what I thought was a simple
case but I am struggling to access and modify the data. Basically I need
some help implementing my first xml column please. Here's a sample of what I
would like to store:
<Recommendations>
<Recommendation type="standard">Treatment Required</Recommendation>
<Recommendation type="standard">Therapy Advised</Recommendation>
<Recommendation type="freeform">Test for Diabetes</Recommendation>
</Recommendations>
This is a list of multiple recommendations elements, which have a
Recommendation type attribute, and a value which is the text of the actual
recommendation.
I'd like to be able to query for elements that have an attribute value of
"Freeform".
I'd also like to be able to query for elements that have a value of
"Treatment Required".
I'd like to be able to add (and remove) Recommendations.
I'd like to be able to retrieve these values into an ASP checkboxlist
(array) and also into an ASP bulleted list.
Should be easy, right......? Aaaugh!! Half of my hair is ripped out right
now. So let me start back at the beginning and ask some questions.
1. I'd like to use a schema collection. What should it look like?
2. How should I set the xml column attribute "Is XML Document"
Thanks in advance!