[xquery-talk] Find count of a string in an xml file
muditanain at hotmail.com
Wed Jun 4 10:20:48 PDT 2008
Hi all, I am using SQL Server 2005. I have a table with xml column in which I have loaded an XML file. I want to write an xquery which finds the number of occurrences of a string in the document in some defined tags. The structure of the document is as follows: <subject><displaySubject = "Day"><alt> </alt><alt> </alt><alt> </alt><alt> </alt></displaySubject></subject><subject><displaySubject><alt> </alt><alt> </alt><alt> </alt><alt> </alt></displaySubject></subject> So, I want to find how many time the string "Day" occurs whether in displaySubject or alt anywhere in the document.Also, the "Day" string is not known. I want to find all the strings that occur more than 50 times in the document. I hope I am clear.I would appreciate any help from you. ThanksMudita
Instantly invite friends from Facebook and other social networks to join you on Windows Live™ Messenger.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk