Questions tagged [sqlxml]

SQLXML is a feature in MS SQL (introduced in SQL Server 2000), that enables XML support for making queries and processing data.

SQLXML was introduced in MS SQL Server 2000, and adds support for MSXML library into SQL Server. It allows the user to execute SQL SELECT statements that return XML instead of tabular data. In later versions(from SQL Server 2005), the XML support was extended with adding xml as a type in MS SQL Server to support XPath and XQuery over tables.

More info can be found in SQLXML's page in MSDN: http://msdn.microsoft.com/en-us/library/aa286527.aspx

471 questions
0
votes
1 answer

Is it possible to use SQL XML to insert, and get output from each record?

I would like to perform a SQL XML insert (on MSSQL), and in this case I need to insert a list of files into the DB (this is simple enough). However, there's an auto generated PK column (ID), and I need the ID for each newly created filename without…
Nick Bolton
  • 38,276
  • 70
  • 174
  • 242
0
votes
2 answers

Query XML field in SQL Server

I am using sql server 2008 R2. I have table X with Column XXML with the following structure I want to parse above column XXML and return…
0
votes
2 answers

sp_xml_preparedocument won't parse value from tag with _x in name

Strange thing with sp_xml_preparedocument. Why it not take value from name_x tag ? declare @pXml nvarchar(max) set @pXml = ' _x _1x _y ' DECLARE @hDoc INT EXEC…
Alex A
  • 141
  • 6
0
votes
1 answer

SQL query to retrive value from XMl xolumn

I have a column in table with datatype XML. mycolumn has following value
0
votes
0 answers

creating dataset relationship in xsd

I really need help with creating an xsd, I am new in xml and searched but cannot figure out what the problem is. I need to create this schema so that later I can upload them into two tables Tmp_Action and tmp_Domains. the ActionGUID is a foreign key…
Nicole
  • 57
  • 9
0
votes
1 answer

How to use Linq to parse through XML easly - Need some sample code

I am using XML Auto in my SQL Server to query data out. I want to know how best to parse through the data that it provides. My end goal is to provide a list of items with their values, but I don't know how many columns or what the names of the…
billsecond
  • 612
  • 3
  • 21
  • 50
0
votes
3 answers

Importing and parsing a large XML file in SQL Server (when "normal" methods are rather slow)

I have a large XML file that I need to import and parse into tabular structure ("flatten") in SQL Server. By "large" I mean a file that is around 450 MB, contains up to 6-7 nested levels and lots of elements, ~300. I tried parsing the file both with…
Ido Gal
  • 528
  • 10
  • 26
0
votes
1 answer

SQL Server 2008: SQLXML Query function .query('//mypath/text()') doesn't XML decode

In Microsoft SQL Server 2008, when executing .query('{xpath}/text()') on an XML stream column value, if the value of the XPath selected node contains "&", the return value is "&" instead of "&". Is this a bug, or am I doing something wrong?…
Jon Davis
  • 6,562
  • 5
  • 43
  • 60
0
votes
1 answer

How to handle MIN date in XML Select query

I have XML Type variable which hold XML data, i would like to retrieve data from XML, everything works fine, but when date field has MIN date value(0001-01-01T00:00:00) than its giving error. Is there any way to eliminate this error? Error…
Suresh
  • 1,131
  • 1
  • 15
  • 28
0
votes
2 answers

SQL Server xml column filtering

I have a SQL Server table with xml column. Xml column has the following xml data.

Content by Interviewee1

Interviewee1 is talking about organisation-1

teenboy
  • 368
  • 2
  • 12
0
votes
1 answer

Unable to retrive XML elements value using XPATH when element has attributes

The task i have to grab the elements of a given XML , generate xpath for each element and then retrieve the values of each element: I am able to create step one and two but when an element has attributes the XPATH doesn't work: so if i had the…
ke3pup
  • 1,835
  • 4
  • 36
  • 66
0
votes
1 answer

Flattening xml into columns from different xml elements in SQL

I have the following XML Dog Cat Monkey 4 4 2
am84
  • 3
  • 1
0
votes
1 answer

SQL cannot insert variable into XML column

i have a database that have table Date with a xml Column that is initialise with a default xml data I am trying to insert into that XML column using variable DECLARE @UserID INT; SET @UserID = 10 DECLARE @DataXML XML; SET…
Bassem Tourky
  • 482
  • 5
  • 12
0
votes
1 answer

How to insert Identity value to another table in SQLXML

I am using SQLXML 4.0 to Bulkload data from the XML to the SQL Database. I have 2 tables. "Country" and "Customer". Below is my XML file format ("Data.xml")
Alvin Saldanha
  • 886
  • 9
  • 20
0
votes
1 answer

view SqlXmlCommand.ExecuteCommand() on SQL server

I am having an issue where I am looking at a legacy application that is using SqlXmlCommand objects to get data from the database. There is an .xsd file that has the tables that are being used, and what fields, their relationships etc. The issue…
ncbl
  • 1,295
  • 2
  • 12
  • 19