Discussion:
Importing data from excel or csv file
(too old to reply)
S***@infosys.com
2007-10-22 06:06:30 UTC
Permalink
Hi,

How to import data from excel or csv file to db2 tables.

Can we do it in CLP or thro control center, if so send me the command too.

Or do we have any utility to import and export data from various file formats.

Please let me know ASAP..
we r in a urgent need
Will Honea
2007-10-22 07:29:13 UTC
Permalink
Post by S***@infosys.com
Hi,
How to import data from excel or csv file to db2 tables.
Can we do it in CLP or thro control center, if so send me the command too.
Or do we have any utility to import and export data from various file formats.
Please let me know ASAP..
we r in a urgent need
Works from either CLP or CC. For a first pass, use CC to set up the import,
then take a look at the SQL command before you execute - that will give you
the syntax and a bunch of options it uses by default. Modify the statement
from there. I do a lot of this and the only real nuisance is the date
formats - excel can put out some screwy ones. I usually set the excel date
to conform to the mm/dd/yyyy format and that normally gets by.

I find that the loads are a little faster using CLP - but nothing to write
home about - as it allows me to script several different imports that get
done frequently.
--
Will Honea
S***@infosys.com
2007-10-22 13:04:02 UTC
Permalink
Is there any options for importing the excel file i dont see any options for importing from a excel file If u find send the sql query

thank you,
Selvakumar.
Will Honea
2007-10-22 21:29:14 UTC
Permalink
Post by S***@infosys.com
Is there any options for importing the excel file i dont see any options
for importing from a excel file If u find send the sql query
I don't know what platform you are on but excel would imply Windows. I
haven't tried the reverse direction, but you can link DB2 (or any of many
other databases) so that excel directly queries the database by use of some
3rd party applications. I have no idea of how they work in the reverse
direction (excel -> DB2) but I haven't found any that are especially
powerful for other than MS products (Access, SQL Server, FoxPro) so I
wouldn't get too excited about it. A google search might turn up something
you could use, but I rarely use Windows so I don't qualify as an expert by
any means.

My use is for an office staff wanting to produce reports with excel as a
front end. Since those are pretty much static with regard to the data
transferred from DB2, I just wrote some scripts that produce a series of
CSV files which they import into excel and let it go at that.
--
Will Honea
Continue reading on narkive:
Loading...