Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003

    Thumbs up Unanswered: 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

  2. #2
    Join Date
    Dec 2002
    Portland, OR, USA

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts