开发者

Free client for accessing DB2 that can import csv file

Do you know any free client for importing csv files into db2 for 开发者_JS百科win (something like Toad or Tora but for db2)?


It's not graphical, but DB2 has a built-in IMPORT command for CSV files. You should be able to issue it from any graphical tool like Data Studio or the Control Center.

IMPORT FROM my_file.csv
OF del
INSERT INTO my_table

Instead of INSERT, you can also do INSERT_UPDATE or REPLACE (which removes all existing data).

If you want to pick specific columns in the CSV, add a method modifier:

IMPORT FROM my_file.csv
OF del
METHOD P(2, 3, 5)
INSERT INTO my_table

(P stands for position. The indexes are 1-based.)

You might then need to also specify specific columns in the table:

IMPORT FROM my_file.csv
OF del
METHOD P(2, 3, 5)
INSERT INTO my_table(my_column_2, my_column_3, my_column_5)

Edit: I should mention that there is a free version of Toad for DB2. I haven't used it, so I don't know if it has the features you are looking for.


The new graphical tool from IBM is Data Studio that you can download from http://www-01.ibm.com/software/data/optim/data-studio/ This is a free tool (free of charge like db2 Express-C)

Once you have installed this application, you can select your datase in the Data Source Explorer view:

Database connections > DATABASE > DATABASE > Schemas > SCHEMA_NAME > Tables > TABLE_NAME.

Once you are over the database, you right-click on it, select Data, and then Load. This will perform a Load operation over the table.

If you are a developer that you Eclipse, you will understand this tool easily.

There is another tool, historically included with db2 called the control center (db2cc). It has been the main graphical tool for DB2 where you can do many operations like Imports and Loads. However, since version 9 it has been deprecated. This tool is also free of charge and it is written in Java.


Well I used Toad for table creation and SQirreL for importing data from .csv file. It works fine. With free Toad version you cannot import data.

Thanks a lot. Melita

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜