ms Excel to MySQL Import Problems

Discussion in 'Databases' started by VsUK, Feb 18, 2010.

  1. #1
    Ive been trying to export a ms excel file into my SQL Database without success!

    I export to text file or CSV within ms excel & upload to my db table, however it sticks all the data into the first field.

    My excel file has 4 columns & my db table has 4 fields, city, state, people & airport.

    Ive googled & tried different things but all imports to the first field aka city.

    Any advice or help to make it import correctly? I have over 3,800 lines of info to add & manually adding them using the admin page on my site isnt an option :D

    thanks
     
    VsUK, Feb 18, 2010 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Try navicat. You can import from a bunch of different file types.

    They have a free 30 day trial, and a lite version for non-commercial usage. The lite version is really only missing some of the more advanced reporting, backups, and scripting.

    http://navicat.com/download.html
     
    jestep, Feb 18, 2010 IP
  3. chengary

    chengary Banned

    Messages:
    88
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    use sql...
    program(C#,PHP,JSP...) to read excel data and then makes up sql.
     
    chengary, Feb 19, 2010 IP
  4. VsUK

    VsUK Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks, worked perfectly :D
     
    VsUK, Feb 23, 2010 IP
  5. graformix

    graformix Member

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    graformix, Feb 25, 2010 IP
  6. redlightshooter

    redlightshooter Greenhorn

    Messages:
    94
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    18
    #6
    if you still cannot find the tool and its a worst case, you can make the query with the excel formula to concat the field into sql insert statement then copy and execute on phpmyadmin.., i think phpmyadmin can execute more than 500 line on a time..
     
    redlightshooter, Mar 1, 2010 IP
  7. imhawk

    imhawk Well-Known Member

    Messages:
    615
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    140