-2

I would like to know how can I save several excel files into DB2 using a blob/clob object. Can anyone try to explain me how to reach the goal or redirect me to some documentation or similar issues?
Thank you for your time.

Raul
  • 115
  • 5
  • 16

1 Answers1

0

db2 IMPORT utility can do this.

Look at the LOB import considerations. If you table newtable has (i int, b blob(1m)) columns, you can prepare a text file inputfile.del with the following contents.

1,"file1.xls"
2,"file2.xls"

and import the data with the following command (it expects your xls files in the /tmp/data dir, and inputfile.del in the current directory):

IMPORT FROM inputfile.del OF DEL 
    LOBS FROM /tmp/data 
    MODIFIED BY lobsinfile
    INSERT INTO newtable
Mark Barinstein
  • 11,456
  • 2
  • 8
  • 16