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

learn more… | top users | synonyms (1)

1
vote
1answer
36 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 ...
1
vote
0answers
56 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
2answers
78 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
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 ...
3
votes
1answer
51 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 ...
4
votes
2answers
2k views

Loading XML documents to Oracle 11g DB with control file

I am using Oracle 11g XML database and trying to load XML documents to this DB with a control file and the sqlldr utility. All these XML files have an element that contains a date string with time ...
2
votes
2answers
330 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 ...
2
votes
1answer
1k views

ORA-16000 when trying to perform select on read only Oracle database

My application's SQL encounters an ORA-16000 error when trying to access a read only Oracle database. ORA-16000: database open for read-only access ORA-06512: at "SYS.XMLTYPE", line 272 ORA-06512: ...
1
vote
3answers
500 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 ...
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 ...
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 ...
1
vote
3answers
63 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
99 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....
6
votes
2answers
122 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 ...
1
vote
1answer
157 views

Querying XML with Unicode data

I'm trying to select attribute value from XML column using XPath with a parameter that can be a Unicode string. Could you please tell me how to make these two examples work? create table #test ( ...
2
votes
2answers
236 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
43 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 ...
3
votes
1answer
105 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 - ...
6
votes
2answers
4k views

Which datatype to store XML data in: VARCHAR(MAX) or XML

I am defining a schema for a new set of resources using SQL Server 2008... In this case, each record (e.g. row) will need to store XML fragments. From time-to-time; although not frequently; I'll need ...
2
votes
1answer
25 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
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 ...
4
votes
1answer
179 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 ...
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 ...
1
vote
1answer
44 views

putting together contents of XML column - from all rows of a table - how to get it done without a “while”?

I have a table called sizeguide with the definition you can see below. I am interested in the SizeGuideXML column, which is type XML. I had a mission the objective was, for each SizeGuideDesc, get ...
5
votes
2answers
10k views

How do I import XML to a SQL Server table?

Can anyone help me work towards fixing my solution to import my XML data into a SQL Server Table? I have done my research, but this task has been very hard for me to accomplish. Everything I have ...
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
84 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 ...
22
votes
1answer
200 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 ...
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
137 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 ...
3
votes
1answer
83 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 ...
1
vote
1answer
987 views

Import XML data retaining while creating ID's with relationships

I need to parse XML from a file into tables while retaining their relationships through custom-generated ID values. IE, if I had the following XML: <root> <construction> <...
0
votes
1answer
60 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 ...
4
votes
1answer
109 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(...
1
vote
1answer
4k views

Oracle Select with xmlquery() error - How to ignore errors?

In trying to extract a subset of data from a Oracle DB table, one of the columns is XMLType, which is extracted with xmlquery() for relevant information. The problem is that the XML data is from an ...
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....
5
votes
1answer
219 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
153 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 ...
1
vote
1answer
91 views

How do I use a SP in SQL Server 2014 to call a external XML source?

I am attempting to retrieve Currency Exchange rates from http://www.floatrates.com/daily/usd.xml using a SP in SQL Server 2014. The result is in XML. So I created the following SProc: --DROP ...
3
votes
1answer
609 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" ...
3
votes
2answers
61 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
13 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
237 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
457 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, ...