<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><META content="Microsoft SafeHTML" name=Generator>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Tahoma;}
</STYLE>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Tahoma;}
</STYLE>
Hi all,<BR> <BR>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.<BR> <BR>The structure of the document is as follows:<BR> <BR><subject><BR><displaySubject = "Day"><BR><alt> </alt><BR><alt> </alt><BR><alt> </alt><BR><alt> </alt><BR></displaySubject><BR></subject><BR><subject><BR><displaySubject><BR><alt> </alt><BR><alt> </alt><BR><alt> </alt><BR><alt> </alt><BR></displaySubject><BR></subject><BR> <BR> <BR>So, I want to find how many time the string "Day" occurs whether in displaySubject or alt anywhere in the document.<BR>Also, the "Day" string is not known. I want to find all the strings that occur more than 50 times in the document.<BR> <BR>I hope I am clear.<BR>I would appreciate any help from you.<BR> <BR>Thanks<BR>Mudita<BR><BR>
<BR>
<BR><br /><hr />Instantly invite friends from Facebook and other social networks to join you on Windows Live™ Messenger. <a href='https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends' target='_new'>Invite friends now!</a></body>
</html>