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

learn more… | top users | synonyms (1)

0
votes
2answers
65 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
23 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
61 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
110 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
220 views

Mysql - Select To XML

I'm Building Audit Trail with Trigger, and want to convert the inserted / updated / deleted value into XML and store it into another table. my trigger look like this: DELIMITER $$ CREATE ...
3
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 ...
1
vote
1answer
615 views

Views for XML with attributes using XMlTable

I created an XMLType table CREATE TABLE PERSON OF XMLType XMLTYPE store AS OBJECT RELATIONAL XMLSCHEMA "PERSON.XSD" ELEMENT "root"; The XML is - <root> <Person empid="1" empname="Joe" ...
1
vote
1answer
58 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 ...
2
votes
1answer
719 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: ...
3
votes
2answers
34 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 ...
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
1answer
55 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
29 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
0answers
431 views

Search for string in xml column

I am using sql server 2008 r2 express. I have a table with column name 'xmlmycolumn' which is of datatype xml. I want to search for string in that whole xml. So to do this i am casting column as ...
1
vote
2answers
181 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
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
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 ...
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
74 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 ...
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"> ...
0
votes
0answers
21 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 ...
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
236 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
33 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 ...
-3
votes
1answer
175 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 ...
1
vote
1answer
124 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 ...
6
votes
3answers
18k views

Converting XML to MySQL tables

I have a large XML file in the following format and I need to convert this file into a MySQL table. Please let me know how can I accomplish this? ~~~~~~~~~~ <host starttime="1392325468" ...
2
votes
2answers
6k views

Trigger to audit table changes

I have created a trigger to audit changes to a table: CREATE TRIGGER [dbo].[iudt_AutoAuditChanges] ON dbo.CPTCategoryMaster AFTER INSERT,DELETE,UPDATE AS BEGIN SET NOCOUNT ON; ...
3
votes
1answer
116 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
286 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', ...
2
votes
0answers
398 views

Transform XPath map into XML document using relational data [closed]

Background Most modern databases have XML functions that can be used to extract data in an XML format. I want to avoid the task of manually calling XML functions to extract the data. This problem ...
1
vote
1answer
386 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; ...
2
votes
1answer
904 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 ...
4
votes
1answer
630 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 ...
4
votes
3answers
534 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) + '.' ...
1
vote
0answers
115 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
1answer
13k views

trying to turn XML into heirarchical SQL tables, can anyone provide a good explanation of two parts of this code example?

I am trying to learn how to turn XML into heirarchical SQL tables. I have found an old code snippet from a Microsoft forum which is basically what I am trying to do, but I was wondering if someone ...
2
votes
1answer
166 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 ...
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
489 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
731 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 ...
2
votes
2answers
510 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
180 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
110 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 ...
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 ...