Querying against an Xml field in a stored procedure
I have worked out a query to search a table that contains a field of type Xml.  The Xml contains a tag called "rule" that contains an attribute called "value"  An example of the query that I'm using is:

    SELECT *
    FROM Rulesets
    WHERE Ruleset.exist('/ruleset/rule[contains(upper-case(@value), "DEFAULT")]') = 1

I would like to be able to create a stored procedure for this query, and pass a parameter to use where the text "DEFAULT" appears.  

Any ideas?

Thanks!
Querying against an Xml field in a stored procedure
===

I have worked out a query to search a table that contains a field of type Xml.  The Xml contains a tag called "rule" that contains an attribute called "value"  An example of the query that I'm using is:

    SELECT *
    FROM Rulesets
    WHERE Ruleset.exist('/ruleset/rule[contains(upper-case(@value), "DEFAULT")]') = 1

I would like to be able to create a stored procedure for this query, and pass a parameter to use where the text "DEFAULT" appears.  

Any ideas?

Thanks!