SQL 2005 xQuery how to compare complete xml document to xml data type column

  • SQL 2005 xQuery how to compare complete xml document to xml data type column

    I'm hoping this is so simple that none of the MS articles included it.  I'd like to use C# to execute an xQuery which will compare an xml document to the xml documents stored in an xml data type column.  I've got lots of good examples (.exist, .value, .query) to find records based on certain parts of the xml matching but I'm holding out for a really simple example which will compare the complete document in the where clause. 

    I wish I didn't need to compare the entire document but my marching orders are to do that.  I've tried passing in an entire string of the xml for comparison without much luck and I'm hoping that isn't the answer.

    Thanks in advance for any suggestions!

     Kinch

  • It looks like I can use the xpath 2.0 function deep-equal to compare

    deep-equal(a,b)

    I hope this works well since generating a where clause from xml isn't the cleanest.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply