Questions tagged [xml]
Short for 'eXtensible Markup Language.' A textual markup language for transferring structured data.
384 questions
0votes
0answers
27views
How to get info from Query Store for ONLY scans and seeks for a specific index, and NOT for when index is just updated
I'm am finding indexes to delete, and have come up with some scripts that are really useful, in terms of figuring out when an index is used. There's 2 sql statements, the first creates a temp table ...
0votes
0answers
41views
why i can't see the reason behind early termination in the XML?
I was running this query db fiddle and in the XML I could not find the reason behind early termination now when I used trace flag 8675 The output was: End of simplification, time: 0.001 net: 0.001 ...
1vote
1answer
60views
How to extract indeterminate attributes from xml in a postgres db?
I've inherited a legacy DB in which excel data is stored in a text column of a table in a postgres DB. A value from that column might look like: <Sheets> <Sheet1> <Addresses E54=&...
1vote
1answer
166views
How to convert single column with XML data into multiple columns, while querying Extended Events XEL file
We have created an Extended Events session to capture errors with severity 16 or higher: CREATE EVENT SESSION [Error_Reporting] ON SERVER ADD EVENT sqlserver.error_reported( ACTION(sqlserver....
12votes
1answer
1kviews
Is "ROW_NUMBER() OVER(ORDER BY xml.node)" well defined?
(It is more a question of documentation rather than behavior. It has been migrated from Stack overflow as was suggested there.) While researching the answer to another question that required ...
0votes
2answers
360views
how to convert nvarchar(max) or varchar(max) to xml in sql server
I am trying to convert msdb jobs messages to xml. I am using Ola Hallengren backup routines. when I run the following routine it works amazing and converts everything. now, if I change the number 3333 ...
8votes
1answer
2kviews
XML Query keeps converting < to < and > to >
bigxml4u Some query plans are too large to be properly stored as XML. You get the error: XML datatype instance has too many levels of nested nodes. Maximum allowed depth is 128 levels. Which is fine. ...
-1votes
2answers
902views
Is there a simple way to filter XML datatype in SQL-Server?
I have a table in an SQL-Server database, containing a column, called XmlMsg, being of the datatype Xml: "Columns" definition: I would like to filter on that column, which first I did using ...
-1votes
1answer
130views
SQL Query content from XML issue
This is the XML table I need to query. And I need to query the 52324672-bd54-44cf-b836-869d39d64bd8 from value tag. I tried to query like this But it is not working as the issue looks from the i:...
4votes
1answer
824views
How does the XML_COMPRESSION option work?
XML_COMPRESSION has recently gone GA in Azure SQL Database I've been trying to find some details about how it works to understand the pros and cons and so far not found any specifics. Trying the below ...
2votes
1answer
373views
Converting VARCHAR to XML with a size restriction
I have a query that needs to return text as valid XML. I also need to restrict the length of the text to a specific number of characters. I adapted a function that performs the conversion and outputs ...
0votes
1answer
600views
Generate XML for each group in the table
I have the below data which I need to group with buid, duid and aid INSERT INTO XmlTable (id, cid, aid, buid, duid) VALUES(624220, 68487905, 33, '77D8B242', 'DF6DC7D0') ,(625475, 68487905, 33, '...
-1votes
1answer
274views
XML Reader Performance
I am trying to optimize a query and it seems that this code, specifically the XML Reader is causing the issue. insert into #temp1 (Items, ApplicationId) select distinct convert(varchar(2000),z.query('....
1vote
1answer
74views
How to get more then one concatenated column from table rows
Below is a code i use now. In real life @stab table is big (and it is normal table not variable) and there are many concatenated columns, not only 2. I wonder is there any better solution than I use ...
2votes
2answers
2kviews
XML datatype instance has too many levels of nested nodes. Maximum allowed depth is 128 levels
This is the error message I get when running the query below: Msg 6335, Level 16, State 102, Line 43 XML datatype instance has too many levels of nested nodes. Maximum allowed depth is 128 levels. ...