473,326 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 12785
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

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

Similar topics

4
by: Ram | last post by:
We are trying to load text tab delimited files into SQL server using informatica 5.1 version. The text files are FTPed to a local server and then files are moved to applicable folder before...
7
by: Suma | last post by:
I have background in SQL server and none in DB2 hence the question. SQL Server has a bcp command - I am looking for an equivalent utility in db2 I have a table called Employee(empid int ,fname...
3
by: Ben | last post by:
Hi all - I am having a bit of trouble and thought maybe someone in this group could shed some light. Here's the skinny... I am creating an automated process to import a bunch of text files...
2
by: Ray Stevens | last post by:
I am loading a pipe-delimited string from a DataSet into StringBuilder, such as 00P|23423||98723 (etc.). For some reason the pipe character is displaying in the debugger as "o" with two small dots...
0
by: Terry Olsen | last post by:
I wrote the following code to load a DataTable with a CSV file. My problem is: If I include the line "MyTable.Clear()" before I start loading the Table, I'm presented with the 2nd line of my CSV...
2
by: Ted | last post by:
In MySQL, I use "LOAD DATA INFILE 'my_path/data_file.txt'" to load data from a plain text file. Of course, the actual statement is a bit more complex once one considers the various options (e.g....
5
by: yeoj13 | last post by:
Hello, I have a db2load script I'm using to populate a large table. Ideally, my target table is required to have "Not Null" constraints on a number of different columns. I've noticed a ...
6
by: =?Utf-8?B?UmljaA==?= | last post by:
'--this code works but only reads text into one column when contains multiple cols Dim ds1x As New DataSet Dim ConStr As String = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data...
3
by: Flugeldorph | last post by:
I am new to Visual Basic, my preferred languages is C or C++. I am trying to load a local database with data that I am reading from a delimited flat file. I have created the database tables and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.