Looking for some basics on XQuery expresssions in SQL Server 2005? Here is a great guide that is right in the books-on-line (BOL).
http://msdn2.microsoft.com/en-us/library/ms189919.aspx
This guide, for example, is useful if you want to find out what the different types of comparison operators there are. According to the guide, there are four.
- General comparison operators
- Value comparison operators
- Node comparison operators
- Node order comparison operators
Note that the Value operators ('eq', 'ne', 'lt', etc.) work on singleton atomic values. You can use the General operators instead of just the Value operators for comparison.