Short for 'eXtensible Markup Language.' A textual markup language for transferring structured data.
6
votes
1answer
121 views
How to shred .docx XML?
I am trying to import a xml (actually a docx file) to a sql server 2008 database. I am almost a novice in XML programming. I googled a lot but almost all the examples there are with simple xml file. ...
1
vote
1answer
99 views
SQL Server stored procedure working when run manually, not running from SQL Server Agent
I have a procedure that runs fine using the execute command in SSMS, however putting the same command in a job gives the following error.
line 9, character 9, unexpected end of input
The code ...
0
votes
3answers
42 views
built-in XML functions in Oracle
I am trying to use built-in XML functions, but I'm getting an %s: invalid identifier error. Selects works fine without the XML functions.
Any ideas where is the mistake?
select id,full_name from ...
0
votes
0answers
82 views
How to create table set from several XSD in SQL Server 2012 or with VS 2012
Is there any solution in T-SQL or in C# how to create XML schema collection in T-SQL or C#?
Problem is I cannot use:
USE Database_test
GO
CREATE XML SCHEMA COLLECTION Collection_from_XSD AS
N'
...
1
vote
1answer
282 views
How to remove column output in a for xml path query with a group by expression?
I forgot how to remove a column from being output in a FOR XML PATH query using a group by expression. I used it before but somehow I lost the article. In the below example. I do not wish to have ...
0
votes
0answers
43 views
XML Data convert to SQL database,
I have an XML feed that i need to parse daily, i want to store all of the data from the XML feed in a SQL table so then that data can be queried and manipulated by my clients.
I can currently parse ...
2
votes
2answers
106 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 ...
0
votes
1answer
53 views
Query not returning items in the original order
Consider the following set, which is the content of the table variable @ProductContent that was just created for the query that runs against it:
Notice how items are sorted by media_type_id, ...
5
votes
1answer
112 views
What must be in place to validate a XMLTYPE against a schema?
I have a procedure that generates an XMLTYPE and I want to validate it against a schema. The problem is that there seems to be a permissions issue running createSchemaBasedXML because when I run the ...
3
votes
1answer
65 views
How to Return XML Node Ordinal, or delete node based on element value?
I have an XML document similar to this:
<Root>
<Sub>
<Record>
<Guid>aslkjflaksjflkasjfkljsd</Guid>
</Record>
<Record>
...
3
votes
1answer
50 views
Is it possible to use Oracle XMLTABLE and %type column type selector?
I am creating a stored procedure which gets an xml input and inserts the data to a table using XMLTABLE.
I want to know how can i specify a field type according to a table column type when passing ...
0
votes
1answer
86 views
What is the best way to insert a XML input to an oracle table in stored procedure?
I want to write a stored procedure which has a XML input (clob type) and inserts the data to a table. my XML structure is something like this:
<rowset>
<row>
...
2
votes
0answers
114 views
Transform XPath map into XML document using relational data
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 ...
2
votes
1answer
41 views
FOR XML is generating a empty first line
I'm parsing with flash a XML file generated by this code:
:XML ON
USE MyDatabaseName
GO
SET NOCOUNT ON
SELECT * FROM ProgramacionDia as programa order by hora
FOR XML AUTO,
ROOT ('toflash'),
...
5
votes
1answer
180 views
SQL Server / MySQL to DTD (+XML)
Is there any way I can at least export a table schema from MSSQL or MySQL to a DTD file? Also the same for the data of the tables to XML.
I am really not getting how to write DTDs, so I badly need a ...
3
votes
1answer
74 views
Item Index for all items in nested XML query
I have a requirement to build an XML package with a parent record, and 1..N related child records.
The child records are to be a nodes under the parent node, and there may be one child record or ...
1
vote
1answer
219 views
SSMS Oracle import using OpenQuery over LinkedServer (Oracle Provider for OLEDB) - XML Parsing: unable to switch encoding
I am trying to migrate the data from an OracleDB to an SQL Server Express database. I'm doing this by openquerying a linked server (data provider based on Oracle Provider for OLEDB). Everything works ...
2
votes
1answer
673 views
How to remove xmlns from child elements with FOR XML
I have a TSQL query that I use to generate a SOAP document. I am using two namespaces. Namely:
- http://schemas.xmlsoap.org/soap/envelope/ for "packaging" the soap document
- A custom one that ...
1
vote
3answers
133 views
SQL Server xml performance
I have a table with 21 columns. The majority are numerical and the rest are nvarchar.
I need to add 4 columns that will contain XML data for each row. The XML data for each row can be anywhere from ...
7
votes
0answers
105 views
Generate XML using Oracle XML schema
I have some XML schema definitions that have been registered using DBMS_XMLSCHEMA. I have created tables using the XMLTypes generated. I can create XML using XMLQuery and if I understand correctly, ...
7
votes
1answer
244 views
Variable for element name
I have this tSQL code which works OK:
SELECT
c.logguid,
a.b.value('./PropertyValue', 'varchar(max)') asd
FROM [dnn].[dbo].[EventLog2] c
cross apply ...
1
vote
0answers
161 views
FOR XML EXPLICIT problems in SQL Server 2005 Express
SQL Server 2005 Express Service Pack 2 w/Advanced Services
Windows 2003 R2
I recently migrated a database from MSDE 2000 to MSSQL 2005 that is used for a tourist website that can be displayed in one ...
13
votes
2answers
550 views
Optimising plans with XML readers
Executing the query from here to pull the deadlock events out of the default extended events session
SELECT CAST (
REPLACE (
REPLACE (
XEventData.XEvent.value ...
0
votes
2answers
324 views
how to select * from XML where id=1?
declare @xml xml,
declare @num int
set @num = 1
set @xml = '
<row>
<Id>1</Id>
<name>reza</name>
</row>
<row>
<Id>2</Id>
...
1
vote
2answers
142 views
XML Large DataBase is the best? [closed]
Is the best way to implement a large database is XML? Or is there a better way?
1 - reduce the time complexity
2 - Reduce the amount of traffic between the tables
And other factors ...
Which ...
0
votes
1answer
111 views
avoid insert xml duplicate data
how can to prevent duplicate inserts for every Execute?
insert into IQ (XMLDT)values('<row>sdsdf</row>')
1
vote
1answer
249 views
how to convert xml to database table
input:
Declare @OUT xml
select @OUT = N'
<row>
<kind>MainCat</kind>
<sortid>1</sortid>
<kind_id>1</kind_id>
<PPoet>حافظ</PPoet>
...
0
votes
0answers
28 views
dtd restrictions [closed]
I am making a xml for a survey taken by students in a class. My dtd of responses looks like this:
<!DOCTYPE responses [
<!ELEMENT responses (student)+>
<!ELEMENT student (response?)>
...
1
vote
2answers
666 views
SQL statement to combine main table and child table as columns?
Having a main table and a child table in a Microsoft SQL Server database (2005+), I want to show the user a single table in a grid view which includes rows from the main table and rows from the child ...
2
votes
2answers
470 views
Fast XML, slow XML
Our database update Windows application needs to transfer some data between two databases as part of the process for a certain one-time update. I chose XML as the intermediary to move the data.
The ...
3
votes
4answers
2k views
Is it possible to get SQL Server 2008 to download a file from a URL
I have a set of XML based services running on my network.
The data in these services needs to be mirrored into a Table on an SQL Server 2008 instance.
Getting the XML into a table is no problem I ...
1
vote
1answer
360 views
Trying to Build TreeView Query in T-SQL
I have parent records in two tables, Table1 and Table2. Some records in Table3 are children of Table1, and some are children of Table2.
I would like to build a query that I can use to populate a ...
2
votes
1answer
82 views
I would like to better understand the SQL Server security model in terms of users and groups to possibly replace an XML heirarchy model I am using
I am currently using XML in my database to represent metadata for individual products. I am using the below schema to enter the data. In each sub grouping of fields you will notice the cms_name ...
4
votes
1answer
616 views
T-SQL: Convert XML to string without self-closing tags
We have a weirdo system we're integrating with which consumes XML, but it does not understand self-closing tags, so
<BOOKING>
<BOOKINGID>56812</BOOKINGID>
<PERSONCODE />
...
3
votes
1answer
321 views
How do I merge two XML variables in SQL Server (2005/2008)?
Forward: I've already read this StackOverflow thread and it does not address the depth retention I need.
I want to create an XML document that contains the data definition objects for a single ...
0
votes
0answers
208 views
Identifying XML Node Position in SQL Server 2008
I am having a problem identifying the node position that contains a particular element in a piece of XML.
In the example below I would like to extract the position for each node within the statements ...
1
vote
0answers
75 views
XML parsing failed
I'm using a query on a oracle db which extracts values from clobs using the xmltype function and an xpath. Unfortunately the query fails and reports a 'XML Parsing failed'. I assume that one of the ...
0
votes
1answer
121 views
Parse message_body(XML)
I know the contents of @message_body are:
<inserted DocNo="xxxx99999"/>
I want to put 'DocNo' into a variable I created @DocNo and have tried various this such as:
SET @DocNo = (SELECT ...
2
votes
0answers
157 views
going from heirarchical XML to heirarchical SQL tables then SQL to c# objects to go to user view, how should I store the data in the databases?
Hi I'm getting my data from a web service using their getData call and it comes in as fairly chunky heirarchical XML, first everything all at once, like
<allData>
<product1>
...
1
vote
1answer
387 views
SQL Database to XML?
I would like to export SQL data to an XML file so it can be read in COBOL. I am working with SQL Express 2008 r2.
0
votes
1answer
174 views
How to convert data from XML format into Excel workbook or database table [closed]
I have some data that is given in a consistent XML format (which I can't change). I would like to import it into a database so that I can work with it, and then search, identify and export certain ...
2
votes
1answer
57 views
Would appreciate some advice on using external data with SQL Server 2005
I'm a web developer with a bit of DB experience, but this one is beyond my knowledge.
We're trying to set up a new website. The data - products, prices, descriptions etc - are supplied by an external ...
3
votes
1answer
8k 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 ...
1
vote
1answer
108 views
Mysql database design with XML
I intend to create a wiki webpage, but it has some few more limitations than regular wikis. The content is completely user-editable, but the structure of the page is determined previously. To make ...
9
votes
4answers
1k views
How to store data in a database without tables?
All I learned in school was SQL which saves data to tables.
Right now I am working on a project where data is stored in XML-files. Additionally every XML contains a reference to visual files (JPEG).
...
2
votes
1answer
313 views
How can I escape XML field in XML-output query?
I have following request:
SELECT XMLAGG(data) FROM
(SELECT XMLELEMENT(name item, XMLFOREST(
title,
body as description,
date_created as date,
'http://example.com/news'||id as link
)) AS ...
2
votes
3answers
106 views
Document versioning
I want to store in SQL Server 2008 XML files, but in a way that versioning is supported.
For example, I have a XML document and I save it in the DB(in the XML datatype column). After that, I edit it. ...
0
votes
1answer
223 views
Returning Multiple Result-Sets or Single XML Blods
I've been writing some new Stored Procedures, and find myself returning between 6-8 result-sets in a few cases. I've always worked under the assumption that there were certain inefficiencies with ...
3
votes
1answer
993 views
Storing XML in varchar(MAX) or use SQL-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 ...
0
votes
2answers
261 views
SQL Server XML Insert Optimize?
I have a 400k XML document trying to insert into an 86-column SQL Server 2008 table.
It takes about 35 minutes to get that XML into a temp table using this code:
with XmlNamespaces ( ...

