|
I have some XML-like data that is stored as nvarchar(max). A cell from the table in which it is stored, looks a bit like this: I want to be able to split the string up and only pick bits of the data out (and dump the results into a table) so that it looks (for example) like this. I should probably add that some of the elements I want to split out could easily be over 8000 characters in length in their "post-split" state.
(comments are locked)
|
|
Seems pretty straight forward to me OR Am I missing something? BTW, why are you keeping xml column as a NVARCHAR field? Is it to keep it available across multiple servers? If you cannot change it then for future work, you can make a VIEW which would have this field CASTed as XML.
Mar 13 '12 at 06:32 AM
Usman Butt
;-) "....pretty straight forward..." Looks like I'm going to need the "for dummies" primer in that XML querying language! I don't get it at all.
Mar 13 '12 at 06:32 AM
GPO
"...why are you keeping xml column as a NVARCHAR field?..." It's a vendor's database. Who know why they do what they do.
Mar 13 '12 at 06:35 AM
GPO
hmmm...but still Are you not one of the stakeholders ;). As far as the straightforwardness was concerned, I meant it should be treated as reading the xml. The words like "could easily be over 8000 characters in length in their "post-split" state" were making me think that may be I have not understand the question properly :) But, rest assured me too is not an expert in XML. I have seen people doing some crazy stuff with that, and I never seem to have the time to understand ;)
Mar 13 '12 at 06:43 AM
Usman Butt
(comments are locked)
|

