469,306 Members | 1,881 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,306 developers. It's quick & easy.

Db2 loading from Tab delimited Txt file

Hi all,

I am pretty much new to DB2 platform and i have one query...

I have to import data of about 7 million rows into a Db2 table.

i am using the following import statement right now

db2 "import from file_name of del insert into table_name"

But i was told the default delimiter is Comman(,) ,the case here is i have a tab delimited Txt file.So can someone help me out with the correct import statement.

Also i need to commit after every 2000 records in the same import statement.
Aug 14 '08 #1
4 12246
Hi ananthaisin ,

This is the command that will suite for your reqirements

db2 "import from file_name of del commitcount 2000 insert into table_name"

Regards

Padmanaban
DB2 Associate
Aug 14 '08 #2
I think you will have to modify the tab delimited file to a csv or any other delimiter. For example, if the delimiter is "^", then you can use

db2 import from filename of del modified by coldel^ insert into ....
Aug 15 '08 #3
Ty guys really helped me out.....but the loading is so slow duno why....

Coming up with more questions..:)
Aug 16 '08 #4
Import utility is just like insert statements and hence wil take some time. Load, on the other hand, is very fast but you will not be able to commit after every 2000 rows. if there is no req for commiting every 2k rows, you can use load.
You may also want to look at this article: http://www-128.ibm.com/developerworks/db2/library/tips/dm-0403wilkins/

Oldie but goldie..
Aug 17 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Ted | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.