0
votes
0answers
127 views

Iterating through XML in T-SQL

I'd like to ask if there is an easy way to iterate through my XML data using T-SQL. My xml looks like: <node_1> <set attribute4="text"> <CONDS> <COND variable="a" ...
0
votes
1answer
68 views

Parsing OpenXML with multiple elements of the same name based on attribute

Similar to this question but I need to parse based on specific attribute. How do you select only one of the elements with the same name based on the attribute value? DECLARE @doc int EXEC ...
0
votes
1answer
94 views

OpenXml any better alternatives?

I have to shred the xml contents (transaction xml ) into some 7 tables. The approaches i'd in mind is a) Single SP, use OPENXML and traverse through the xml contents and update the required tables. ...
1
vote
2answers
275 views

Does nodes() or openxml returns rows in same order as it finds in xml?

I have an xml which i need to parse using openxml or nodes(). The xml contains few child tags that repeat with different values, as below. <root> <value>10</value> ...
0
votes
1answer
109 views

SQL+Openxml+how to store NVARCHAR data

hello i am using the following stored procedure to insert the xml data in a table. PROCEDURE [dbo].[ExpertSystem_SET_QuestionData] @XmlQue NVARCHAR(MAX) AS set nocount on DECLARE @XmlHdl INT ...
1
vote
1answer
488 views

OPENXML T-SQL not working as expected

I'm writing a stored procedure that takes Xml, but the part that parses the Xml isn't working quite right. Here's the sproc: CREATE PROCEDURE [dbo].[SprocName] @Xml TEXT AS DECLARE @XmlHandle ...
0
votes
2answers
1k views

Extracting data from XML using OpenXML in SQL Server

I have a xml which I want it to be extracted using OpenXML within SQL Server Here is the sample XML <row> <student_token>7</student_token> ...
2
votes
1answer
522 views

Carriage return symbol is removed from XML using OPENXML

It looks like SQL Server removes \r characters when parsing XML. So when my stored procedure receives values in xml for saving, all line breaks are represented as \n instead of \r\n. Is there any way ...
1
vote
1answer
896 views

Parsing OpenXML with multiple elements of the same name

I have a data structure as such: <rootnode> <group> <id>1</id> <anothernode>first string</anothernode> <anothernode>second ...
8
votes
1answer
246 views

Excel to SQL, C# libraries

I have an excel spreadsheet that a client has given me which is broken down into multiple worksheets. I need to extract certain columns from each worksheet on a row-by-row basis and to iterate through ...
4
votes
2answers
189 views

error come to execute the stored procedure using with open xml in sql server

i execute the below stored procedure.but it shows the error. The error is 'Incorrect syntax near '.'.i.e error shows in 'xmlFields.Country' please look this stored procedure also and help me thanks, ...
0
votes
2answers
703 views

Best approach, Dynamic OpenXML in T-SQL

i'm storing XML values to an entry in my database. Originally, i extract the xml datatype to my business logic then fill the XML data into a DataSet. I want to improve this process by loading the XML ...
0
votes
1answer
373 views

SQL OpenXML returns nothing when the XML doesn't fill every level

I'm having an issue with OPENXML in SQL Server 2005 where I'll get no results back if the XML doesn't have every tier available. An example would clear up my question: So we have XML like this: ...
0
votes
1answer
146 views

Query xml data from SQL2000 (xml saved directly in a cell, multiple rows)

Hi I get problem retrieve XML data from SQL2000 server. The table structure is as following: ID Name XML 1 Name1 ...
1
vote
2answers
1k views

OPENXML with xmlns:dt

Use OPENXML to get dt element in MSSQL 2005. How can I get xmlns:dt element in xml? For example, get a result set of two rows that list product id and country code. 121403 GBR 121403 USA declare ...

1 2
15 30 50 per page