• this is what I have in my sp

    INNER JOIN

    @C.nodes('/C/CUSTOMER') as m(item) on cast(CS.CUSTOMER_NUMBER as int) = m.item.value('CUSTOMER_NUMBER[1]','integer')