how to import database from excel into mysql?

Discussion in 'MySQL' started by rapidoffers, Oct 11, 2008.

  1. #1
    im not good at sql, please everybody help me. Thanks
     
    rapidoffers, Oct 11, 2008 IP
  2. Exia

    Exia Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just search for a .CSV to .SQL conversion script on Google. :)
     
    Exia, Oct 11, 2008 IP
  3. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #3
    Export your excel to .csv using Save As option in MySQL and then import .csv file to MySQL using phpmyadmin.
     
    mwasif, Oct 11, 2008 IP
  4. rapidoffers

    rapidoffers Peon

    Messages:
    69
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    But phpmyadmin request "column1 quot; column2 quot; ......" format. Example: I want to import 2 excel columns to 2 sql columns. How to import?
     
    rapidoffers, Oct 11, 2008 IP
  5. captaincore

    captaincore Peon

    Messages:
    98
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    save it as csv. theres also etl tools for this. informatica, etc.
     
    captaincore, Oct 12, 2008 IP
  6. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #6
    Use navicat. You can import directly from an excel file, csv file or just abount any other text format you would come across. - http://www.navicat.com/
     
    jestep, Oct 14, 2008 IP
  7. graformix

    graformix Member

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #7
    graformix, Oct 19, 2008 IP
  8. shacow

    shacow Active Member

    Messages:
    339
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #8
    I think "bigdump" can also support csv imports. Google it.
     
    shacow, Oct 19, 2008 IP
  9. jgarrison

    jgarrison Peon

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You can also use Excel's concatenate function to build Insert statements. You build an Insert statement for the first row and then copy/paste it down the rest of the spreadsheet to generate the rest of the inserts.

    Example:
    Concatenate("INSERT INTO table (column1, column2, column3) VALUES ('", A1, "','", B1, "','" , C1, "');")

    -Jim
     
    jgarrison, Oct 19, 2008 IP