Solved

import from excel in db2

Posted on 2006-06-27
5
804 Views
Last Modified: 2008-02-01
I have some data in excel(csv) ; the sequence of data in excel matches the sequence of data in table
I need to import the data in db2 what wil be the bext way to do it

Thankyou!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0
Comment
Question by:royalcyber
5 Comments
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 16999100
Hi royalcyber,
use a LOAD statement probably with the delimted format....

which OS/Environment/Version of UDB/Db2 are you using?

Cheers!
0
 
LVL 45

Expert Comment

by:Kdo
ID: 17000101
Hi RoyalCyber,

If you've got some odd formatting issues (like dates) you might find it easier to use Micro$oft Access to link to the csv file and export it to DB2.


Kent
0
 
LVL 13

Expert Comment

by:ghp7000
ID: 17000927
if you could post one line of the csv file then it would be easier to tell you how to approach this problem
0
 

Author Comment

by:royalcyber
ID: 17001197
coursecode,jrsscode,exitlevel,date,lastupdatedby

az101,Q301212,1,09/02/2006,tom



i have 10,000 records in the file
0
 
LVL 13

Accepted Solution

by:
ghp7000 earned 500 total points
ID: 17009338
with 10k records you could use import or load, import if you dont want to impose exclusive locks on the table, load if speed is more important and you can load the data without worrying about concurrent access.
As for the method, its quite straightforward
db2 import from filename insert into tablename
your table must be definded as follows:
col1 char or varchar
col2 char of varchar
col3 smallint or int
col4 date
col5 char or varchar
if the table has primary key or index, some records may not be loaded or imported
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now