• You could ignore the namespace by using a pseudo-namespace and a * to name all namespaces:

    ;

    WITH XMLNAMESPACES(DEFAULT 'some_string')

    SELECT

    pref.value('./text()[1]', 'varchar(MAX)') AS 'BankAccount'

    FROM @MyXML.nodes('//*:GetEmployeeDetails/*:return/*:BankAccounts/child::node()') AS RequestXml(pref)

    where pref.value('local-name(.)[1]', 'varchar(100)') ='BankAccount'



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]