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

SQL Server : getting a unique count from multiple XML rows?

I have a table with two columns. A foreign key identifier and a XML column. The XML column contains details about the foreign object. If for example my table contains the following: 1 |
1 |…
Kyle
  • 17,317
  • 32
  • 140
  • 246
0
votes
1 answer

Why is SQL 2005 calling CONVERT when passed a sqlxml parameter?

I am declaring an SqlXml param and passing it a XmlReader. This then gets parametrized and the SQL gets executed all very well. However, when looking at the SQL which gets executed through profiler I notice that it is taking the SqlXml parameter and…
Dysard
0
votes
1 answer

TSQL XML character escape

I try to convert this into XML: DECLARE @xml XML; SELECT @xml = (SELECT 'xxx' + nchar(0x10) FOR XML PATH('') ); I got error: XML parsing: line 1, character 9, illegal xml character But this works fine: SELECT 'xxx' + nchar(0x10) FOR XML PATH('')…
gethomast
  • 436
  • 1
  • 3
  • 10
0
votes
2 answers

Querying a SQL View containing XML columns from LINQ to EF

I have a table in SQL Server 2008 created as follows: EDIT: I had been doing some tests setting ANSI_NULLS OFF and ON and i mistakenly pasted the create table statement with ANSI_NULLS OFF, i have tried both ways and i still get the error but wanted…
dmiranda84
  • 56
  • 2
  • 7
0
votes
1 answer

Get a list of fields out of an XML data type

Given a table structure like such: DECLARE @Employees TABLE(EmployeeID INT ,EmployeeDetails XML) INSERT INTO @Employees( EmployeeID ,EmployeeDetails ) VALUES ( 1 ,' Priyanka 24…
Sam
  • 1,514
  • 2
  • 14
  • 22
0
votes
1 answer

Using SQLXMLBulkLoad, getting exception because column does not accept NULL values

I am trying to bulk insert XML Data into SQL Server 2005 Express with the SQLXMLBulkLoad Object Model in VB.NET using Visual Studio 2010. When the loader gets to an element in my .xml file which does not hold a value, it throws an error because the…
Josh McKearin
  • 742
  • 4
  • 19
  • 42
0
votes
1 answer

How to use WHERE on attribute in XML column in Sql Server 2008

This is probably simple and I just don't get the braces right, but since I have virtually no experience in querying SQL SERVER XML data, it's driving me insane. I have a simple table with an XML typed column NoSqlField. This contains either NULL…
Olaf
  • 10,049
  • 8
  • 38
  • 54
0
votes
1 answer

Parameter to xml value method through a join result

I am shredding an xml column in a view, and extracting information from that column. My view is currently running a large CASE statement on local-name((/*)[1] to get the name of the root node in the XML, and then I am drilling into the xml to fetch…
Aaron Hudon
  • 5,280
  • 4
  • 53
  • 60
0
votes
1 answer

SQL - Formatting XML response value

I want to receive my response XML in following format... Ajay 29 Mobile
Vijay
  • 363
  • 11
  • 25
-1
votes
2 answers

XPath Query to find supplier name through an XML table

I am trying to find out the cities where there is a supplier with the name of Herman. We are using XPath through Microsoft SQL Server Management Studio. I am not a CIS major and I have no idea where to start. So that's why I'm asking for help... I…
iGSto
  • 1
  • 1
-1
votes
2 answers

How to get XML element and attribute value in SQL?

I need to get all values from XML either it presents in element or attribute. Example: DECLARE @XML = ' 1 2 ' Here, my expected…
LTA
  • 191
  • 3
  • 16
-1
votes
1 answer

C# SQLXML Deserialization to Class or Object

http://rtt.metroinfo.org.nz/RTT/Public/Utility/File.aspx?ContentType=SQLXML&Name=JPPlatform.xml http://rtt.metroinfo.org.nz/RTT/Public/Utility/File.aspx?Name=JPRoutePositionET.xml&ContentType=SQLXML&PlatformTag=536 Both of those are my sample data…
Jalomba
  • 25
  • 6
-1
votes
2 answers

SQL XML Parsing in T-SQL

I have SQL Server table which has XML column that has data like below. Multiple records will be there in the table. Let us say table T1 and Column C1. Our requirement is we need to get the latest data (by max of datereported, datecreated,…
Saravanan
  • 283
  • 2
  • 17
-1
votes
1 answer

I have several XML documents that have different amount of names under images on each page

I have several XML documents that have different amount of names under images on each page. It can be one name or it could be 50. how can I insert this into a SQL database? This is a snippet of the XML, so under images there is a name is this there…
-1
votes
1 answer

Read XML Root values into Table

I am working with XML files to save into a database table. This is my XML:
Indra
  • 279
  • 2
  • 3
  • 16
1 2 3
31
32