Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Update/insert the xml data in database table

Author  Topic 

kumar_j
Starting Member

7 Posts

Posted - 2007-10-10 : 16:12:35
From: JAGADISH KUMAR GEDELA [jgedela@miraclesoft.com]
Sent: 10/10/2007 4:13:43 PM
To: jgedela@miraclesoft.com [jgedela@miraclesoft.com]
Subject: forum
Hi all,

I need to Insert the XML File data into SQL SERVER 2005 db(table).
For that I created the table with XML Native column (using typed xml)
*********************************create table command************
CREATE TABLE XmlCatalog (
ID INT PRIMARY KEY,
Document XML(CONTENT xyz))
***********************************
In order to Create the table with typed xml ,before that we have to create the xml schema which i
mentioned below
************************************create schema command********
CREATE XML SCHEMA COLLECTION xyz AS
'Place xml schema file ’
************************************
I created the xml schema file by using the xmlspy software.

--------------------------Insert command---------
INSERT into XmlCatalog VALUES
(1,'copy xml file ‘)
-------------------------------
I need to retrieve the xml data from the table
------------select query----------
SELECT Document.query (‘data (/X12//UserId)') AS USERID,
Document.query (‘data (/X12/X12_Q1/header/ISA//ISA_Authorization_Information_Qualifier)')
AS
ISA_Authorization_Information from XmlCatalog.
-----------------


I Need to update/insert/delete the xml data in the table

Can you please suggest the procedure to implement the above requirement(insert/update/delete)

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-10-10 : 16:57:37
http://weblogs.sqlteam.com/mladenp/archive/2007/06/18/60235.aspx

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

kumar_j
Starting Member

7 Posts

Posted - 2007-10-10 : 17:07:29
hi,

I need to update/delete/insert in that table
quote:
Originally posted by spirit1

http://weblogs.sqlteam.com/mladenp/archive/2007/06/18/60235.aspx

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com

Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-10-11 : 05:04:58
you can modify xml datatype with these XML DML statements:
- insert
- delete
- replace value of

look them up in BOL.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

kumar_j
Starting Member

7 Posts

Posted - 2007-10-12 : 09:49:59
Hi Spirit1,

I couldn't finf the xml dml in the blog,
Can u please send me the send for the same

quote:
Originally posted by spirit1

you can modify xml datatype with these XML DML statements:
- insert
- delete
- replace value of

look them up in BOL.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com

Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-10-12 : 09:52:01
what blog?
look them up in BOL = Books Online = SQL Server Help

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page
   

- Advertisement -