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 > Failing Import with Decimal Data type

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-24-07, 10:36
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
Lightbulb Failing Import with Decimal Data type

I have a table having column SSFT2 decimal(10,2) as PK and using following import command
IMPORT FROM "D:\DBTeamBkp\DailyBKP\CSV2.txt" OF DEL MODIFIED BY IMPLIEDDECIMAL COLDEL, MESSAGES "D:\DBTeamBkp\DailyBKP\msg2.log" INSERT INTO EONE.TSCH_LA_SBCTGRY_temp (SSFT2, SUBCATEGORYNAME);

Sample data
8.1," Sport, Leisure and Recreation"
8.10," Sport, Leisure and Recreation123"

problem is while importing the second line , database is rejecting it as it is reading the first line as 8.10 instead of 8.1. please tell me the appropriate option for decimal so that it will read first line as 8.1 and not 8.10

--Rahul Singh
Reply With Quote
  #2 (permalink)  
Old 01-24-07, 11:25
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
DECIMAL is a numeric field not character. This means that 10.1 and 10.10 are the same value. Since this is a PK, they are duplicates and the second one is rejected.

Andy
Reply With Quote
  #3 (permalink)  
Old 01-24-07, 23:39
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
thanks
i missed the obvious
will change data type to char/varchar

--Rahul
Reply With Quote
Reply

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