sql - Is @mp:id always in order of the XML Doc? -


I am parsing some XML using OPENXML I need to close the identity of XML to know the order of nodes is.

Is the MP3 id always in order? I know that they are not sequential, but are they in the least order?

For example, the following questions will generate always results in the exact same form as XML? SELECT row_number () Over (according to order ID) RN, STIID, Convert (Vertex (Max), Convert (Verbinari (Max), STIID), 2), [Action] OpenXML VARAR (paramount) 'parametrazed string' [1] '' [desc]] INT '' mp3 id ', [steiid] iit' iid ', [action] ORDER by rss < P> or @mp: id is a matter of a meta data type that can go in any order based on how things are saved?

You have no guarantees of the correct order to get it, you can enter the number sequence (eg NF Table with column number) and then use XPath with the status () function of your XML:

  SELECT NF.Number, Order_id NF CROSS APPLY Select the RAW value (@ id ',' int ') @ xml.nodes (' // root / order [position () = 'sql:' (nf.Number ")] as the" order_id table " Row)) as XMLTable    

Comments