By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,423 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Load command to load data from an XML file to a table

P: 1
Hello All,

I have data in a well-formed xml file. Id like to use the db2 load command load the data into a table. Would someone guide me on how to code the Load command to accomplish this task? Example:

Expand|Select|Wrap|Line Numbers
  1. <Person gender="Male">
  2.   <Name>
  3.     <Last>Cool</Last>
  4.     <First>Joe</First>
  5.   </Name>
  6.   <Confidential>
  7.     <Age unit="years">5</Age>
  8.     <Birthdate>2002-03-16</Birthdate>
  9.     <SS>111-22-3333</SS> 
  10.   </Confidential>
  11.   <Address>5224 Rose St. San Jose, CA 95123</Address>
  12. </Person>
Target Person Table: All columns are varchar 254
Expand|Select|Wrap|Line Numbers
  1. LAST_NAME  FIRST_NAME  AGE  BIRTHDATE   ADDRESS
  2. Cool       Joe         5    2002-03-16  5224 Rose St...


Thanks in advance for any help
3 Weeks Ago #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.