Solved

import from excel in db2

Posted on 2006-06-27
5
813 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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:Kent Olsen
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

How to Create Failover DNS Record Sets in Route 53

Route 53 has the ability to easily configure DNS record sets specifically for failover scenarios. These failover record sets can be configured to failover to full-blown deployments in other regions or to a static HTML page that informs your customers of the issue.

Question has a verified solution.

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

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

630 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