If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Import CSV not working in primary keys

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-19-09, 07:30
kirubamatrix kirubamatrix is offline
Registered User
 
Join Date: Nov 2009
Posts: 2
Import CSV not working in primary keys

Hi,

I have a csv file and when I import into the DB2, it gets imported.

But, when there is a primary key in the column of the same table, the value does not get imported.


I need your suggestions

the command I used is IMPORT from "d:\\gg1.csv" of DEL INSERT INTO EMPLOYEE
Reply With Quote
  #2 (permalink)  
Old 11-19-09, 08:51
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
DB2 Database for Linux, UNIX, and Windows

lookout for identityignore , identitymissing on this page


Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 11-19-09, 09:08
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You can also alter your identity column to be "generated by default" instead of "generated always".
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #4 (permalink)  
Old 11-20-09, 01:07
kirubamatrix kirubamatrix is offline
Registered User
 
Join Date: Nov 2009
Posts: 2
New Issue

Hi Thanks for your suggestions, friends.

Now I face new problem.

I have number datatype in oracle

similarly smallint in db2

when i convert the datas it comes as a null value....

need suggestions...

(What will be the appropriate to convert number data type in oracle to db2??)
Reply With Quote
Reply

Tags
csv, import, primary key

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On