I have xml data in a column called OriginalString as follows. I need to extract all "Item Key" values from this column. I can use the CHARINDEX and SUBSTRING function combination to extract the first occurance of ItemKey, but how do I do this when I have multiple "Item Key"
bajara · Jan 15, 2015 1:18 PM · 10,057 views
If i understand your question correctly: Select OriginalString.value('(Addyourrootnodehere/AttributenameHere/@ItemKey)[1]','varchar(max)') as [AlchiLagyo] from dbo.YourTableNameHere i wud deff love to see your implementation using CHARINDEX AND SUBSTRING though :P
alece · Jan 15, 2015 2:20 PM
This conversation is preserved exactly as it was on the original Sajha.com and can't accept new replies.
Start a New Discussion