> Hi, can someone show me how to get the following working with a NameSpace.
You need to declare the default element namespace, see below:
SELECT
x.item.value('@AquirerBank[1]', 'VARCHAR(5)') AS AquirerBank
,x.item.value('@AcquirerID[1]', 'int') AS AcquirerID
,x.item.value('@StoreName[1]', 'VARCHAR(50)') AS StoreName
,x.item.value('@MerchantID[1]', 'VARCHAR(50)') AS MerchantID
FROM
@Merch.nodes('
declare default element namespace
"
http://www.mywebsite.com/supMerchants";
//supMerchants/Body'
) AS x(item)