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
 openxml and populating two tables

Author  Topic 

Nader
Starting Member

41 Posts

Posted - 2010-04-30 : 01:01:16
how to use openxml to extract the xxxx from the following xml file
note the 0000 are values not required
to populate two tables first table with the following columns( id,fn,family,email) the other table (id,customerrole)



<root>
<properties>
<datasource>00000000</datasource>
<datetime>000000</datetime>
</properties>
<person>
<sourcedid>
<source>00000</source>
<id>yyyyyyyy</id>
</sourcedid>
<userid useridtype="Logon ID" password="000000">0000000</userid>
<userid useridtype="SCTID" password="yyyyyyyyy">yyyyyyyy</userid>
<userid useridtype="Email ID">00000</userid>
<name>
<fn>yyyyyyyy</fn>
<n>
<family>yyyyyy</family>
<given>0000000</given>
</n>
</name>
<demographics>
<gender>00000</gender>
</demographics>
<email>yyyyyyyy</email>
<adr>
<street>000000</street>
<locality>00000</locality>
<region>00000</region>
<pcode>00000</pcode>
</adr>
<institutionrole primaryrole="00000" institutionroletype="000000"/>
<institutionrole primaryrole="00000" institutionroletype="yyyyyy"/>
<extension>
<myperson>
<academicmajor>000000</academicmajor>
<academicmajor>000000</academicmajor>
<customrole>yyyyyyy</customrole>
<customrole>yyyyyy</customrole>
<customrole>yyyyyyy</customrole>
<customrole>yyyyyyyy</customrole>
<customrole>yyyyyyy</customrole>
</myperson>
</extension>
</person>
</root>

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-30 : 01:45:04
sorry i cant spot xxxx within xml. do you mean y patterned values?

in any case see below

http://msdn.microsoft.com/en-us/library/aa276847(SQL.80).aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -