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

Xquery with XML column in Xml.Modify in SQL Server not working

I am trying to modify the node in the XML that it gets a new id after inserting in the main XML this xmlfields where groupid = @groupid element and the qubefieldId = @i Can someone tell me why this is not working? Update @temp Set…
user551445
  • 25
  • 6
0
votes
1 answer

Query results same when using xml raw,element and xml path

I am using sql-server 2012: I have query like this: CREATE TABLE #XmlTestTable ( ID INT PRIMARY KEY IDENTITY(1,1), FirstName VARCHAR(20), LastName VARCHAR(20) ) INSERT INTO #XmlTestTable (FirstName,LastName)…
Hare Rama Hare Krishna
  • 1,025
  • 5
  • 14
  • 19
0
votes
0 answers

SQLite create DB table from xml (xsd)

I have xml (xsd) file. I need create db table in SQLite db, and load data from XML to this table (in C# application). I try to use this code: string ConnectionStr = "Data Source=mydb.sqlite;Version=3; New=True; Compress =…
e1s
  • 335
  • 4
  • 22
0
votes
1 answer

SQLXML is not working from java

Environment Details are : - Appserver is : - apache tomcat 8 jre 1.8 (latest as on March 01,2015) Database is MS-SQL Server 2008 Below is the Code Snippet: - <%@ page import="java.util.*,java.io.*,org.xml.sax.* ,javax.xml.*, org.w3c.dom.*,…
0
votes
1 answer

SQL fetch xml data attribute and values from non xml type column

How to retrieve xml type data from non xml type column using SQL I am having one table and a column inside it xml is a column of type ntext xml column data example is given below
Pankaj Das
  • 45
  • 1
  • 7
0
votes
1 answer

SQLXML Bulk Load connection string

I use SQLXML Bulk Load to import data from xml to DB. With MS Sql Server 2008 works great. SQLXMLBULKLOADLib.SQLXMLBulkLoad4 objBL = new SQLXMLBULKLOADLib.SQLXMLBulkLoad4(); objBL.ConnectionString =…
e1s
  • 335
  • 4
  • 22
0
votes
1 answer

SQL save data into XML column with grouping and nesting

I am having a issue regarding saving a data from a table which is like below in to xml ID personID Type Name category value 1 1234 xtype John abc 200 2 1234 ytype John xyz 230 3 1234 ztype John …
user3494425
  • 107
  • 10
0
votes
1 answer

How can I query a value in a XML column in SQL Server 2008

I have following XML stored in a XML column in a SQL Server database table. Aaa Bbb
Aks.Soms
  • 137
  • 3
  • 13
0
votes
1 answer

Query XML data in SQL Server using replace in criteria

I have an XML column in my SQL Server 2008 table. What I'm trying to do is for a given parameter to my stored procedure strip out any spaces (using REPLACE) in the param and use this in the WHERE criteria but then using the XQuery exist clause also…
0
votes
1 answer

How FOR XML Works in SQL Server

Can somebody explain how is FOR XML used in SQL Server? Is this the only way to concatenate strings by rows without using an user-defined function? I got it from this post, did what I need to do, but I don't understand it. The person who posted…
Concerned_Citizen
  • 6,548
  • 18
  • 57
  • 75
0
votes
1 answer

How to update records with multiple tables linked by a foreign key using XQuery (or OPENXML) in SQL Server?

I have T-SQL code like this: DECLARE @xml XML = (SELECT CONVERT(xml, BulkColumn, 2) FROM OPENROWSET(Bulk 'C:\test.xml', SINGLE_BLOB) [blah]) -- Data for Table 1 SELECT ES.value('id-number[1]', 'VARCHAR(8)') IDNumber, ES.value('name[1]',…
user4099684
0
votes
1 answer

Splitting tables in SQL Server 2008

We are currently developing a online advert site for people to buy and sell (similar to gumtree) difference being this will be used for employees who work for the company, it wont be reachable from people outside the company. Now we have 15…
Code Ratchet
  • 5,758
  • 18
  • 77
  • 141
0
votes
1 answer

MS SQLXML. Import XML with specified namespace

I have to import XML data into a SQL Server database. I have the following XML (for example): With…
Sergey Nikitin
  • 845
  • 2
  • 13
  • 25
0
votes
1 answer

Use Inner Select value in Where Clause

I have an SQL query that I am trying to use a subs elects value in the outer where clause. SELECT count(A.[processID]) AS total, B.[process] AS processName, (SELECT TOP 1 LocationDesc FROM …
SBB
  • 8,560
  • 30
  • 108
  • 223
0
votes
1 answer

How to pass SQLXML type to view in Spring MVC?

In my webapp controller I'm getting results from the db, which are of type java.sql.SQLXML. I want to pass it to the view to be returned verbatim (as XML). The problem is, the data associated with SQLXML is released as soon as I leave JdbcTemplate…
Horacy Oliwka
  • 123
  • 2
  • 9