Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting values into SQL from nested nodes using bulk load

Status
Not open for further replies.

IS300

MIS
Oct 29, 2003
121
CA
Is there a way to import values that are in nested nodes from a XML file into a SQL database? I get the other nodes imported fine, but when it gets to one that is nested, it doesn't bring the value over. Here is the xml file:
<CMRS>
<reportDate>Jun 24, 2004</reportDate>
<reportTime>0800</reportTime>
<rigNumber>1</rigNumber>
<jobNumber>500</jobNumber>
<depthDrilled>
<from>31</from>
</depthDrilled>
</CMRS>

I need to get the value that is in the <from> node into the database, but it doesn't want to go. Here is my mapping file:

Any ideas?
 
If your xml file is nested, you have to either insert it into multiple tables or create a XSLT to make the XML file flat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top