Exforsys

Free Training

Multiple Insert/update rows using xml

This is a discussion on Multiple Insert/update rows using xml within the SQL Server forums, part of the Database category; Hi all, I want to insert multiple row from xml file to table in database.. i am try this code ...

Go Back   Exforsys > Database > SQL Server

Exforsys.com

  #1 (permalink)  
Old 03-25-2009, 06:59 AM
Junior Member
 
Join Date: Mar 2009
Posts: 1
prakash09 is on a distinguished road
Question Multiple Insert/update rows using xml

Hi all,

I want to insert multiple row from xml file to table in database..
i am try this code to insert..

ALTER PROCEDURE sp_InsertByXML ( @strXML VARCHAR(4000) )

AS

BEGIN

DECLARE @intDocHandle int



--Create an internal representation of the XML document.

EXEC sp_xml_preparedocument @intDocHandle OUTPUT, @strXML



INSERT INTO Person ( PersonId, PersonName )

SELECT * FROM OPENXML(@intDocHandle,

'/PersonData/Person', 2)

WITH

( PersonId INT,

PersonName VARCHAR(100)

)



-- Remove the internal representation.

EXEC sp_xml_removedocument @intDocHandle



END


please any one help me to resolve this issue.

Regards,
Om
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Insertion of multiple values using a single insert statement in oracle 10g simplyshravan Oracle Tutorials 1 09-19-2008 12:31 AM
Walk-In @ "IBM INDIA" : Multiple Skills : Multiple Locations : On 17 & 18 May 2008 manish.patel Experienced Job Seekers - India 0 05-15-2008 01:44 AM
(Exp 2 Yrs)"IBM" Walk-In-22nd July : Multiple Locations : Multiple Technologies manish.patel Experienced Job Seekers - India 1 07-18-2006 09:31 AM
Solaris x86 FAQ 2/2 Dan Anderson Tech FAQ 0 04-27-2004 07:24 PM
[FAQ] FileMaker Pro - database for Macintosh and Windows Martin Trautmann Tech FAQ 0 04-17-2004 07:26 AM


All times are GMT -4. The time now is 01:28 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.