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 > Informix > error when load csv data into informix

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-29-03, 22:36
kavithaa kavithaa is offline
Registered User
 
Join Date: May 2003
Location: kl
Posts: 1
Thumbs up error when load csv data into informix

hii friends this is kavitha,when i load the data from .csv files into informix,i get a error like
load from 'sample.csv' DELIMITER ','
INSERT INTO atest(x,y)
# ^
# 846: Number of values in load file is not equal to number of columns.
#
# 847: Error in load file line 1.
#
#

****my data file sample.csv******* i have 2 rows data as below
"0,3,4",0,0,"Growing Herbs from Seed, Cutting, and Root""0,2,1",0,0,"The Perfect Storm: A True Story of Men Against the Sea"

**************************
table name -- atest
it has 2 columns x and y each column size 100 characters.

plss tell me solution,how to overcome this problem
many thanks
kavitha
Reply With Quote
  #2 (permalink)  
Old 06-02-03, 14:11
astrue astrue is offline
Registered User
 
Join Date: Dec 2002
Location: Portland, OR, USA
Posts: 26
Re: error when load csv data into informix

It appears that, even if Informix will allow your double-quoted strings as one field (and ignore the imbedded commas instead of treating them as delimiters), that you are still asking it to load 4 columns for each row in your input file, while the table only has 2 columns. The reason I say this is the '0,0' pairs I see in the file. Are they supposed to be included in the quoted strings? If you can drop them or include them inside the quotes, you may be able to get past this error.

HTH
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