Join Based on XML fields

  • Hi,

    I am new to working with XML in SQL 2005. I have two tables with XML Fields, I need to join these tables based on the XML fields, but I get the following error.

    "The xml data type cannot be compared or sorted"

    TABLE A

    Field1 (XMLdatatype)

    TABLEB

    Field1(XMLdatatype)

    Select * from A

    JOIN B

    on A.Field1 = B.Field1

  • You cannot directly join the xml data type. in BOL start with .value of xml type. Namely XPath.

    Zubeyir

  • Thank You I will give it a try.

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

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