• ivor1994 - Monday, June 26, 2017 3:31 AM

    Thorn A again thank you. I'm make a mistake because i have a 1000 rows not fields so you probably don't understand me.
     Also you probably think this is the Xml file but it's a communication XML between BarTender and web service application to print. Somehow Bartender is able to read the data from this XML without formatting it.
    To clear all the misunderstandings about my problem. I have column like in the image. I need to read from each row the value of NumberSerializedLabels. I try you select but like you said i have error  Cannot call methods on nvarchar(max).

    As I said, you're storing your xml as an nvarchar(max) and you can't use XQuery on a nvarchar field. The problem is, as well, that your xml is malformed, so you can't convert it to xml.

    Your third party application might be able to handle the malformed xml, but SQL Server will not. I can't stress enough, you need to fix your xml first.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk