Discussion:
How to remove the rightside spaces in the data while loading it into db2 tables.
(too old to reply)
b***@yahoo.co.in
2007-10-11 06:22:03 UTC
Permalink
I am loading a flatfile, data in the file is separated by | character using import statment,data loading is into table fine but here the problem is if the data contains tailing spaces its loading the data with the rightside spaces.

Can any one please suggest me, how to eliminate the rightside spaces from the data while loading into db2 tables.

I am using the following command to load the data

db2 "import from <filepath/filename> of del modified by coldel| keepblanks commit count 500 insert into <tablename>"

the above statment loading the data with rightside spaces.



Thanks
Kiran
Andreas Kannegiesser
2007-10-11 21:11:44 UTC
Permalink
Hi,

maybe you should replace KEEPBLANKS with STRIPTBLANK option.

Good luck,
aka.

Loading...