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

learn more… | top users | synonyms (1)

0
votes
3answers
82 views

SSIS - Best way to insert large number of rows

So here's the scenario: I have an XML file, which is in size of 500GB, and with data of around 600 million rows (once on a database table). I'm using SSIS for the operation, and since it consumes a ...
1
vote
1answer
26 views

How to update/insert/inject nodes into XML

I have an application which stores optional Site information in an XML field. Sample table: CREATE TABLE [dbo].[Sites]( [SiteID] [int] IDENTITY(1,1) NOT NULL, [SiteName] [nvarchar](80) ...
3
votes
2answers
69 views

For XML PATH error (SQL Server 2008 R2) [closed]

I have a big query (if necessary I will post it here) and I'm getting this error: Msg 6841, Level 16, State 1, Line 1 FOR XML could not serialize the data for node 'NoName' because it contains ...
2
votes
1answer
117 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
60 views

sql org chart hierarchical table to xml json

I have a table of employees and managers: create table emp_mgr (emp varchar(99), mgr varchar(99)) insert into emp_mgr select 'Adam',NULL; insert into emp_mgr select 'Bob','Adam'; insert into emp_mgr ...
3
votes
2answers
37 views

Shreded system_health ExEvent not returning all node information

SQL Server is not returning all node information when I shred the deadlock XML from the 2012 system_health Extended event. When I run the following query SELECT ...
3
votes
1answer
56 views

Why is the secondary selective index not used when the where clause filters on `value()`?

Setup: create table dbo.T ( ID int identity primary key, XMLDoc xml not null ); insert into dbo.T(XMLDoc) select ( select N.Number for xml path(''), type ) from ( ...
0
votes
1answer
34 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 ( ...
1
vote
2answers
185 views

Collation conflict when running dynamic sql FOR XML PATH

I am getting the following error message when running the query below: Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "Latin1_General_BIN" in the equal to operation ...
0
votes
0answers
16 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
2answers
55 views

XML vs. Relational databases?

I feel like this isn't the best question to ask on a programming site like this, but I haven't really found a satisfying answer online and I would really like to get a different perspective on this. ...
0
votes
2answers
75 views

xml parameter to distributed query - difference between SQL2005 & SQL2012

I have inherited an old SQL2005 Enterprise database (on Windows 2003) that allows an xml parameter to a distributed query such as this: exec sp_executesql 'exec [server].[database].dbo.sproc ...
0
votes
1answer
18 views

Can SSRS XML data sources contain spatial data?

I've been given the task of producing a report which will extract data from a web service. The web service provides data from a list of sites including aggregates. Lets say total sales by month. ...
0
votes
0answers
22 views

Downloading data via API (XML scheme)

There is a publicly open API for research funding data. I want to download the entire database to my local computer and store in Access or SQL format. They provide XML schema data, but the ...
1
vote
3answers
62 views

Load specific element from XML

I have the following xml: <root> <123 type="line"> <aa type="item"> <value>1</value> </aa> </123> <234 type="line"> <bb type="item"> ...
2
votes
1answer
99 views

search xml column inside large table (7 million rows)

Database design: Table Name : Plays ( 6 million records) Columns: Play id, col1, col2......col7, PlayFieldValues PlayFieldValues xml column. sample xml stored in this column <PlayAttributes> ...
2
votes
2answers
260 views

sp_send_dbmail stored procedure send with attachment

I've been tasked with sending a small monthly report to for one of my customers. The report has previously been run manually on the instance, the output copied to a spreadsheet and send to the ...
1
vote
0answers
34 views

Create Nested XML in a Sql Server Indexed (Materialized) View

This page https://msdn.microsoft.com/en-us/library/ms188276.aspx indicates that if you wanted nested XML (ie an XML Tree) then you need to setup your query like this: SELECT Col1, Col2, ...
1
vote
1answer
53 views

How do I optimise XPath Querying over a large dataset?

I have a table that has 220 M rows. Also the table has a xml column that has XML data. I have configured single file for data and another ndf for index. Table's primary key is guid column. When am ...
1
vote
1answer
125 views

SQL Server to XML files alternatives

I am currently looking for an alternative to writing a large, complex XML file based on a known specification. Currently the file is written in t-sql as a stored procedure. The output is in a results ...
-2
votes
3answers
65 views

How to interract with my database? [closed]

I am generally new to Databases, and I have a MySQL server with several tables which have a unique ID that is connecting them all. I am about to populate the db with data from external resources ...
3
votes
1answer
121 views

Can I split lines into Elements with For XML?

In this example I'm cribbing from a previous question, My source table has a varchar(max) field that I want to split by line into individual elements with FOR XML as I query it. Given this data- ...
0
votes
0answers
46 views

Oracle Audit Trail XML files using XML, Extend, problems with CLOB parsing

Using Oracle 12 to genereate Audit Trail XML, Extended files. Working fine in most cases, but there are some columns that should be audited, of type clob. When parsing the Oracle 12 generated xml file ...
1
vote
1answer
53 views

how to output 3 column into 3 element in xml format with the same name?

I have this code and I can't figure out how to get the expected result? declare @table table (TAG int, PARENT int,col1 varchar(100) ,col2 varchar(100) ...
1
vote
2answers
293 views

Improve performance of converting a large xml file (~300 MB) to relational table in SQL Server

So this is what I have so far: --Read xml content into a XML data type variable DECLARE @FileData XML SELECT @FileData = CONVERT(XML, BulkColumn) FROM OPENROWSET(BULK '\\file_path\test.xml', ...
1
vote
1answer
395 views

HTML entity decoding with oracle DBMS_XMLGEN.convert

Here, I am trying to convert the value, where I don't understand I am going wrong. Your help is highly appreciated! Here I am#44; THis is me there#39;s nowhere else on earth I rather be Here I am#44; ...
4
votes
1answer
640 views

How to avoid using Merge query when upserting multiple data using xml parameter?

I am trying to update a table with an array of values. Each item in the array contains information that matches a row in a table in the SQL db. If the row already exists in the table, we update that ...
2
votes
1answer
922 views

How to update a table with a stored procedure with XML parameter in SQL 2008?

I have the following Stored Procedure query. This query is incomplete. I need help completing this query. Problem: In this SP, I am receiving a well-formed XML string into the SP. My goal is to ...
1
vote
0answers
117 views

export data to xml by the use of query to xml then importing it using xpath

i have use QUERY_TO_XML function in order to export data to xml , after that i want to export this data. this data might contain reserved chars in the xml tags like "' & ..." ex electrical ' ...
4
votes
3answers
548 views

Help with SQL Query to XML output

I have the following query: SELECT [ID] AS [NewID] , ( CASE WHEN LEN([MiddleName]) > 0 THEN [LastName] + ', ' + [FirstName] + ' ' + LEFT([MiddleName],1) + '.' ...
0
votes
0answers
13 views

How is it called when a DB supports FOR XML and XQUERY?

I have my SQL Express 2008 R2 database, on which I heavily rely on two features: Generating XML from relational tables (using FOR XML) Generating relational data from XML (using XQuery) I wonder ...
4
votes
1answer
509 views

for xml missing null columns

When we use for xml clause to create xml from a row like as follows select * from Menus where MenuID=100 for xml path('') The xml will miss the columns which have NULL as the value. I have a found ...
3
votes
2answers
735 views

SQL Server 2008R2 XML Column Index strategy for large tables?

I am working with SQL Server 2008 R2 and some XML columns in a very large table. I understand that I cannot use Selective XML Indexes due to our SQL Server version being < 2012. I'm brand spanking ...
0
votes
1answer
182 views

XMLTABLE solution without getting right parenthesis missing error

I am trying to select from an XML type and produce multiple rows. Have searched for my specific scenario/issue with not much success. Environment: Oracle 12c. I have commented out the offending code. ...
0
votes
1answer
114 views

XMLDB - Nodes to Rows

I have an application that stores XML as XMLType in a table. This is the first time I'm using XMLDB and XMLType features, and was wondering if I could use the results from an XQuery FLWOR expression ...
2
votes
2answers
525 views

How to convert html entities in Oracle?

I'm trying to decode html containing html entities. I've tried dbms_xmlgen.convert and utl_i18n.unescape_reference but the results are less than satisfactory. SET ESCAPE ON; SELECT ...
0
votes
1answer
291 views

PostgreSQL import XML to empty database, automatically create columns

The server is Linux but the development machine is Windows so I'm using psql command line. I tried \i C:/Users/John/Desktop/Parts.xml which did not work so either \i doesn't work with XML or I'm ...
0
votes
1answer
111 views

Is there a more efficient way to apply a new schema to an existing collection when there's existing data?

I'm needing to add a new schema to the schema collection on an existing table. Right now, I simply unbind the old schema collection from the table column, drop it, create the new schema, and rebind it ...
1
vote
3answers
118 views

Longest matching suffix while using aggregate functions

Background Looking to find the longest matching string suffix. Setup Consider the following fiddle: CREATE TABLE noun ("label" varchar(10)) ; INSERT INTO noun ("label") VALUES ...
0
votes
0answers
25 views

Report table for different status

I need my report to show two situations in tabular form. I use Word 2003 and Oracle BI Publisher. One part of the table should only show the rows which has STATUS as 'Success'. First table displays ...
-3
votes
1answer
178 views

xml values are not inserting into the table [closed]

Here is my code: ALTER PROCEDURE sp_Insertxmldata @xml xml AS BEGIN declare @hdoc as int EXEC sp_xml_preparedocument @hdoc output,@xml Insert into ...
0
votes
0answers
23 views

Assigning Parent Node Value using IDs

I am using iReport to build a report and I am trying to find the parent node "group_name" value based on a parent_id given, and return the value the parent, as the child's value. For example: Table: ...
2
votes
1answer
170 views

XML Whitespaces/Unwanted Characters [closed]

Could anyone help on how to remove white spaces from an XML file? I used the following code that i got from Mikael Eriksson on Stack Exchange to extract the site id: cast(msg as ...
1
vote
3answers
1k views

Extracting an an integer value from an xml column [closed]

I'm just wondering how I can extract an integer out of an XML column. Currently all the digits are 4 which the below query is able to do. But the number is going to grow to 10,000's soon which will ...
2
votes
2answers
285 views

Possible to optimize SELECT query involving XQuery functions selecting from elements with arbitrary number of child elements

Suppose I have the following XML data, where <root> can have an arbitrary number of <child> children <child> can have an arbitrary number of <grandchild> children ...
3
votes
0answers
227 views

Ways to process XML into a relational structure in Postgres

I have a database that is comprised of ~10 tables, most of which have many-to-many relationships with each other (and an associated join table). I am inserting of the order 100k XML files into a raw ...
1
vote
1answer
6k views

Simplest way to edit single entry in XML column?

As I understand MS SQL Server Management Studio doesn't allow directly editing/replacing entries in XML columns via GUI (copy/paste doesn't work etc.). What is the easiest option to replace a single ...
1
vote
1answer
2k views

Can I use attribute name to identify XML element?

Rather than using the element index COLUMN[1]/@value below, is it possible to retrieve the column value by specifying an attribute name such as: COLUMN[@name=”Prod_ID”]/@value? When I tried, I got ...
0
votes
1answer
63 views

Optimal way of loading, registering, indexing and querying a huge XMLDB

I've got 35 million highly structured XML documents, with a total size of 500 GB. An XSD is available for this data, and the end goal is to transform the data into an RDB. All fields can be considered ...
0
votes
1answer
722 views

converting then outputting varbinary(max) FOR XML PATH

I have a vendor application that has stored some of its text data in a varbinary(max) column. I am exporting this data (from several tables with different data types), ideally using FOR XML PATH. What ...