Question : Select rows based on XML.exist with multiple values

I have an xml column in a table that can contain an unknown number multiple data values.  For example in the following xml document, scope1 contains two data values but could contain one or more.

<root>
<scope1>
<data>1</data>
<data>3</data>
</scope1>
<scope2>
<data>3</data>
</scope2>
</root>

How do I write a where clause to return the rows that contain a certain value regardless of the position it's in.  For example:

select scope from cTable
where scope.value('(root/scope1/data)[2]','int') = 3

Selects the rows where the second node value is 3, but I want to be able to retrieve the rows if the first node (or node 3 to n) is 3 too.

Answer : Select rows based on XML.exist with multiple values

ok buddy its easy
what you have to do is add a script tag to your code
script tag below for attribute src (where i have given as myJS.js) you have to give the path of the javascript file
actually in VS 2008 after typing src=" if u press CTRL + Space u can pick the url by selecting the Pick URL Option
<script type="text\javascript" src="myJS.js" />
Random Solutions  
 
programming4us programming4us