If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 express C and XML file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-04-08, 09:32
aletibe aletibe is offline
Registered User
 
Join Date: Aug 2008
Posts: 2
DB2 express C and XML file

Hello everybody!
I have a big problem with DB2 9.5 and I really need your help.
In my file system I have a very large document XML (472KB), impossible to open with XML editor and parse to make it well-formed, and I have to insert it into a table that has a single column of type XML.
I thought that I could use IMPORT, following the instructions:
-I copied xmldata.del file in the work directory
-In the work directory I created a new directory named xmldatadir in which I put my file xml
- within the command line processor, after connecting to the database, I typed
IMPORT FROM xmldata.del OF DEL XML FROM xmldatadir INSERT INTO ALESSANDRA.TABLEXML

The result was:
SQL3109N the utility programme is starting to load the data from the file "xmldata.del"
SQL3229W the field in row 1 and column1 is invalid. The row was rejected the code is 1
SQL3229W the field in row 2 and column1 is invalid. The row was rejected the code is 1
SQL3229W the field in row 3 and column1 is invalid. The row was rejected the code is 1
SQL3229W the field in row 4 and column1 is invalid. The row was rejected the code is 1

Of course, it didn’t charge any line…
I tried to use a very small file and certainly well-formed, but the error is always the same.
What can I do?
Would it be possible to save this same document in a table with a column of type CLOB, either using IMPORT or another command?
Thank you very much in advance for all of your help, please mind it’s really important!
Reply With Quote
  #2 (permalink)  
Old 08-04-08, 10:36
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
the problem is the single column xml and specifying the xml file as data file
try to create a table with col1 char(1) and col2 xml
create a file with any character (single)
and use import from singledatafile of del xml from ....
this complete xml doc will be loaded in single row
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On