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.
Asked
Active
Viewed 443 times
-2

Raul
- 115
- 5
- 16
-
regarding this issue, none yet – Raul Feb 06 '19 at 11:47
-
Thanks for the feedback @data_henrik ;) very usefull! – Raul Feb 06 '19 at 11:59
1 Answers
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