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!
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
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be