Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

import from excel in db2

Posted on 2006-06-27
5
Medium Priority
?
814 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 46

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

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 (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…
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

705 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