[Show all top banners]

bajara
Replies to this thread:

More by bajara
What people are reading
Subscribers
Subscribers
[Total Subscribers 1]

twisted_dreams
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 Help: SQL Developer question
[VIEWED 3509 TIMES]
SAVE! for ease of future access.
Posted on 01-15-15 1:18 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

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"
 
Posted on 01-15-15 2:20 PM     [Snapshot: 63]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

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
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 7 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
ढ्याउ गर्दा दसैँको खसी गनाउच
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters