Short for 'eXtensible Markup Language.' A textual markup language for transferring structured data.

learn more… | top users | synonyms (1)

1
vote
1answer
28 views

Create a XML file from an XSD in SSIS using TF XML output destination

I am currently trying to create a xml output based on a xsd. The tool i am using is Visual studio 2012. I have pragmatic works installed in it. So I am trying to make use of the TF XML output ...
1
vote
0answers
57 views

Fastest way to shred large xml data into a table

I have a nightly process that shreds XML data from a 17 million row table (120 GB) into another table, it takes about 3 hours and inserts about 1.5 million records. I currently do a complete drop ...
1
vote
1answer
38 views

Trim a value in an xml column in MS SQL Server

I have a database with an XML column. I am trying to update (trim) an xml value of the xml column. I am running on Windows, SQL Server 2008 Express. I did not find any way to trim directly in Xquery ...
3
votes
1answer
52 views

How to script XML Schema collection in SQL Server 2012?

I need to make script of XML schema collections in my Database and then insert each xml inside a table field as string. I need to do this to compare current schema collections with the new schema ...
1
vote
2answers
82 views

XML column performance in TSQL

I'm finding very limited reading on how a large xml column affects table performance in sql server 2014/6. For reference, it is a 36gig table and minus one xml column, it is 36megs. Some queries ...
1
vote
3answers
67 views

SQL Server Select in XML field

I need a help with the situation below: In my table SQLServer 2012 have a field with xml values, I would like to make a select of the data in that field and show the result in the form columns. &...
2
votes
2answers
103 views

SQL Row concatenation with XML PATH and STUFF giving aggregate sql error

I am trying to query two tables and get results like the following: Section Names shoes AccountName1, AccountName2, AccountName3 books AccountName1 The tables are: CREATE TABLE dbo....
1
vote
0answers
27 views

How can I import data from a NetCDF file into SQL Server?

I'm being asked to investigate the feasibility of importing data from a NetCDF file into SQL server. The file could be upwards of 300-400Mb and provided 4 times a day. However I'm only interested in ...
14
votes
2answers
378 views

LOB_DATA, slow table scans, and some I/O questions

I have a rather big table with one of the columns being an XML data with an average size of XML entry being ~15 kilobytes. All other columns are regular ints, bigints, GUIDs etc. To have some concrete ...
6
votes
2answers
123 views

how to get estimated subtree cost?

If I have a query that returns a query_plan, for instance like this: SELECT TOP 1000 st.TEXT ,cp.size_in_bytes ,cp.plan_handle ,QP.query_plan FROM sys.dm_exec_cached_plans AS cp CROSS ...
2
votes
2answers
238 views

Incorrect syntax generating XML

I am trying to run below code in SQL server 2000 SP4 but getting error. Declare @Body varchar(8000); Declare @TableHead varchar(8000); Declare @TableTail varchar(8000); Set NoCount On; Set @...
6
votes
2answers
112 views

XML parsing slowly

I'm currently trying to tune a somewhat problematic stored procedure and I've noticed that majority of cost associated with running it comes from parsing parsing some XML into a temp table. Here is ...
3
votes
1answer
108 views

How to resolve this 'XML Validation: Declaration not found for element' error?

I'm new to SQL Server and I have this task to complete (for learning purposes), yet I'm unable to figure out this error due to inexperience with XML Schemas (I think) Here's what I'm trying to do - ...
3
votes
1answer
44 views

Help with SQL Server and XML columns

I am writing a query to run against the SCOM 2012 OperationsManager database. SQL instance is Microsoft SQL Server 2012 - 11.0.5058.0 (X64). Within the database is a table called Monitors. The schema ...
0
votes
0answers
10 views

Restore database exported with database_to_xml

I've exported a database to a XML file using the database_to_xml command found in documentation. Now I want to perform the opposite task. I want restore the database from an empty one using this XML ...
3
votes
2answers
60 views

Is there a way to validate XML using variable as schema?

Is there a way to declare XSD schema as variable inside a construct: DECLARE @xml XML(Books)? I need to make quick validation of XML using XSD schema which is declared as variable. I suppose there is ...
1
vote
1answer
25 views

How to convert different string value to respective 'YYYY' int format?

I'm inserting values into table from xml as: DECLARE @XMLRESULT XML DECLARE @tbl_XMLResult TABLE ( RowID INT IDENTITY(1,1), Status VARCHAR(50), Address VARCHAR(250), ListPrice INT, ...
0
votes
1answer
87 views

want to import exported xml file in wamp phpmyadmin

I have exported single table from wamp phpmyadmin as xml file for data verification and want to import it again into database as mysql table. Please give me guidance, how its possible?
1
vote
1answer
97 views

Why SQL function always returning empty result set?

Following function I have write which accept xml and returns table as result. CREATE FUNCTION FunctionTest(@ID INT,@XML_Details xml) RETURNS @RESULT TABLE ( Value1 INT, Value2 INT ) AS BEGIN ...
0
votes
0answers
23 views

XML to Database with XMLSpy

I am using XML Spy to take a XML file (looks like this) and create a database structure after it. I then import the data from my XML file to fill in the rows, etc. I find that some , about 1/4 of the ...
0
votes
1answer
143 views

Selecting from a table contains a XML column

I have received an Excel file (verion 2010) and based on the requirement I was asked to save it as an XML file and then import into SQL data ready to be queried in normal SELECT statements. Below is ...
22
votes
1answer
207 views

Very strange performance with an XML index

My question is based on this: Improve Xquery performance in SQL Server To give an answer there I did the following test-scenario. Test scenario First I create a test table and fill it with 100.000 ...
3
votes
1answer
86 views

Full text search in XML documents

I would like to do full-text search in XML documents. However, I can't get matches for attribute values (I get a syntax error if I provide the full attribute value including the : and / characters in ...
2
votes
1answer
49 views

Query XML without namespace

I can query XML, which has defined xmlns tag with common table expression DECLARE @XML XML SET @XML = '<NodeA xmlns="https://XYZ.xsd"> <NodeB verzePis=""> <NodeC1 attrA="Hello" /&...
3
votes
1answer
55 views

Howto query xml

My source data in a SQL Server table has XML structured data. For each of the source rows I need to query the following sample XML structure in a way that I get a calculated value of all A sub ...
4
votes
1answer
184 views

SQL 2012 CLR error: “The context transaction which was active before entering …”?

I am experience strange error with SQL 2012 and CLR: The context transaction which was active before entering user defined routine, trigger or aggregate "My routine" has been ended inside of ...
2
votes
2answers
343 views

Stored procedure working when run manually, not running in SQL Agent Job

When I execute a Stored Procedure through a SQL Agent Job, I get the following error message: Executed as user: NT AUTHORITY\SYSTEM. XML parsing: line 10, character 33, unexpected end of ...
0
votes
1answer
36 views

SQL to XML with multiple values

Hello I'm new to converting SQL to XML. I have been trying to get this to work for the past few days. SELECT Item.foldername AS "foldername", Item.status, Item.vhrid, Item.firstname, Item....
4
votes
1answer
112 views

How to read multiple record from xml to insert in table in SQL?

DECLARE @tbl_XMLResult table ( Status varchar(50), Address varchar(100), ListPrice varchar(25), SoldPrice varchar(25), YearBuilt varchar(25), SF varchar(25), Acres varchar(...
0
votes
1answer
61 views

How to read and process xml data from stored procedure in sql server?

I am calling a stored procedure like this: usp_ReportResults @query = '759,905,1048,170,725,80129', @ReportName = 'GenRepot' where usp_ReportResult is defined as CREATE ...
5
votes
1answer
221 views

How to better use CLR Function from performance point of view (repeat inside each DB or have general function)?

I asked a question about validation of XML using XSD schema inside SQL Server 2012 (see link). I understand (as I suspected) that I need to use CLR Function. The function will get XSD schema text and ...
4
votes
1answer
155 views

Validate XML using XSD inside TSQL function in SQL Server 2012?

I need to validate XML using XSD inside TSQL. To make this task semi automated I need to do this inside TSQL function. To make validation I have to set value to XML and if it is not valid I will ...
1
vote
0answers
14 views

xmlforest() omits any fields that are null entirely, instead of creating an “empty” element

I'm know I can use an empty string, but I don't want to lose the null functionality in the database. In some cases null is appropriate and I can't use empty strings. Other than a empty string, how ...
2
votes
1answer
26 views

What's the relationship between Documents, XSDs and Collections?

I have a number of XML Schema Definitions describing business objects. It's unclear to me what the correct way to deploy these is if my intention is to make typed xml columns. The name Xml Schema ...
3
votes
2answers
62 views

OPENXML question for SQL Server

I am brand new to OPENXML, and have 90 % of what I want to do working...stuck on this: <ReportHost name="411.114.42.42"> <HostProperties> <tag name="HOST_END">Wed Nov 11 20:48:...
0
votes
0answers
14 views

Help with pure xml query

I work on mainframes and I have got this one off request on purexml which I have to complete. I will be receiving an xml file, which I will be inserting in a DB2 column declared as xml, for schema ...
2
votes
2answers
248 views

Parsing Typed XML with a default namespace and inconsistent root node

I have a structured, typed xml file. <WebService xmlns="http://www.orbis-software.com/WebSvcCon"> <NewLeads> <OutputSchema> <root xmlns="" type="array"> <item type="...
11
votes
1answer
461 views

How can I shred this Extended Events XML as fast as possible?

I created an Extended Events session in SQL Server 2008 R2. The session runs, and collects events as they happen, exactly like you'd expect. If I shred the xml when there are relatively few events, ...
1
vote
1answer
64 views

Procedure completes prematurely after converting comma-delimited value strings to XML

I have a procedure which executes beautifully within SSMS environment yet, when I hook it up to a web page, instead of seeing a list of packageIDs returned, the return is 'null'. I've checked ...
1
vote
3answers
521 views

Can FOR XML PATH return NULL for an empty resultset?

I would think this query select null for xml path('foo') would return NULL, but actuality <foo/ > is returned. Is there any way to achieve this behavior? To clarify, the behavior I would ...
2
votes
1answer
30 views

View created from XML data - Statistics

I am looking at a legacy system that stores XML blobs A view is created over this so the data is more accessible (for reporting) CREATE view [dbo].[Data] as select top 100 percent data.value('(/...
4
votes
2answers
87 views

Is there a FOR XML variant that can add attributes with arbritrary values?

I'm trying to create a query similar to this SELECT 'foo' AS Detail, 'bar' AS Detail, 'baz' AS Detail FOR XML PATH ('Header') To produce something like this- <Header> <Detail type="A"&...
8
votes
4answers
375 views

Modify XML: attributes into elements

I have an XML column that contains data with similar structure: <Root> <Elements> <Element Code="1" Value="aaa"></Element> <Element Code="2" Value="bbb"&...
3
votes
1answer
619 views

Convert Byte Array From XML to VARBINARY

I receive image files as XML data, each byte of the image being a node with its decimal value, e.g. for this example .png file, , the xml I get is: DECLARE @xml XML = N'<?xml version="1.0" ...
0
votes
0answers
150 views

MySQL Load XML Infile with dynamic file name

I have a shell script which loops through a folder and picks up a set of files in turn. I then pass the filename to a .sql script so that the file can be imported into my database. BUT, I can't for ...
0
votes
1answer
120 views

XML load fails on postgresql 9.1, but not in 9.3, any workaround?

I have a problem loading an xml on an xml field of a table. The load is done by ruby code, but this is not the point. Everything worked well for years, but xml is increasing size.... So one day, ...
0
votes
0answers
20 views

How to deploy XSD from SQLCLR?

I have few SQLCLR functions implementing business logic that return SqlXml data. I would also like to make the Xml Schema Definitions in the dll available in Sql Server. It's not a '...
1
vote
1answer
130 views

How to extract xml attribute from a column?

I have a column called target_data in the sys.dm_xe_session_targets that returns the path where the pertinent file resides in the format of xml tags. This data is not in XML datatype. One has to cast ...
0
votes
0answers
65 views

Reading XML content

Please assist. I want to read the following xml file using Oracle database. Fields that I want to see are class, limit and sel. This Xml is stored in a database table as a field/column. Thank you &...
5
votes
2answers
383 views

Import XML files into SQL Server 2012

Every Friday I have to import a couple (sometimes more than 300) of XML files into 2 tables. The structure of one of the tables, R000000, looks like this: R00000010 | R00000020 | R00000030 | ...