how to use comma seperated files(upload) in mysql db ?

Discussion in 'MySQL' started by poseidon, Jan 29, 2006.

  1. #1
    Hi,

    I am having a db of MS Access which I have converted to a CSV file.
    THan I went to cPanel and created the db, THan I created a table using SQL command and it got created successfully. but when I tried to load a csv it gave me error "1064 Blah Bla" ..

    I am not sure what's going wrong as everything looks fine. Can some one explain it to me properly.
     
    poseidon, Jan 29, 2006 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The Blah Blah part would be helpful.

    Does the header row of the csv file correspond EXACTLY with the field names of the table? Also make sure text is "encapsulated" with "'s.
     
    T0PS3O, Jan 29, 2006 IP
  3. expat

    expat Stranger from a far land

    Messages:
    873
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #3
    use the blah blah to paste on g might give you an answer
    study the sql upload carefully

    typical pitfalls
    col names in header row - need to match (or take out if you use different names)
    field separation " optional (always tick as may contain decimal values)

    just check if what you tell the sql is actually what the file looks like

    expat

    PS the cleanest and fastest way to load csv is to use | (pipe) as a field seperator.
     
    expat, Jan 29, 2006 IP
  4. poseidon

    poseidon Banned

    Messages:
    4,356
    Likes Received:
    246
    Best Answers:
    0
    Trophy Points:
    0
    #4
    sorry for the blah blah part :D actually I am getting error #1064 for all of my queris and it means that the query's syntax is wrong :rolleyes: which can not be possible since I am putting very simple test queries. I have mailed to the host and I hope he helps me :) and ya, I will remember to seperate the csv file with "|"
     
    poseidon, Jan 29, 2006 IP