Results 1 to 7 of 7

Thread: problem import data drpd ms excel ke MySQL

  1. #1
    Join Date
    Sep 2007
    Location
    malaysia
    Posts
    7
    Rep Power
    0

    problem import data drpd ms excel ke MySQL

    Nak mintak tlng pakar-pakar mysql.mcm mana nak import data drpd ms excel ke My SQL. saya dh cuba utk save fas file tersebut dalam format .csv tp tak boleh pun bila nak import file dalam mysql.

  2. #2
    Join Date
    Sep 2007
    Location
    Wo|2l|] 0f my 0\/\/|\|
    Posts
    40
    Rep Power
    0
    firstly ur excel file number of columns/fields should match the no of columns/fields of the database before you can import into mysql. Also the sequence of the excel file columns/fields should be exactly the same as the database 1 (the 1st column of excel file should match the database 1 and vice versa)

    2nd, the delimiter, by default mysql is using ; so you should check while saving ur excel file to .csv,whats delimiter u r using for that .csv file and change the delimiter in mysql while importing the csv with appropriate value (usually delimiter will be either ; or , )

    provide us more information bout the error while u trying to import the .csv file in mysql
    Last edited by kenzi7; 19-09-2007 at 01:47 PM.

  3. #3
    Join Date
    Sep 2007
    Location
    malaysia
    Posts
    7
    Rep Power
    0
    saya dh tgk semua susunan field adalah sama dengn fail yg saya nak import. keluar error mcm mana.

    'Invalid field count in CSV input on line 1'.


    adakah cara sy import salah? import guna csv atau csv usibng load data???

  4. #4
    Join Date
    Sep 2007
    Location
    Wo|2l|] 0f my 0\/\/|\|
    Posts
    40
    Rep Power
    0
    Check if the last column of ur excel/.csv file is empty, if it is empty try put a character inside like "-" , i not sure how excel compile to .csv bcoz im using open office and it only compile the active fields which means field that is empty will not be save into the .csv for open office.

    basically u juz click on import -> browse to ur .csv file -> phpmyadmin will select CSV under the (Format of imported file) -> under (CSV options) be sure the setting is correct -> then u r ready to GO

    if u sure ur field count is correct, the delimiter might be the cause and also be sure that the data type of ur excel file match with the database data type (eg, varchar, date,int). you cant insert varchar into a integer or date datatype

  5. #5
    Join Date
    Sep 2005
    Location
    in my body lar...
    Posts
    1,325
    Rep Power
    0
    check whether your field data contains the delimiter character also...

  6. #6
    Join Date
    Oct 2005
    Location
    KLC
    Posts
    91
    Rep Power
    168
    yeah, last message from iamfreelancer is right. some fields might have empty data. if you do csv without field data delimiter, the mysql might get confuse.

    during export from access, please note the following

    Fields terminated by: ; (semicolon)
    Fields enclosed by: " (double quote)
    Fields escaped by: \ (backslash)
    Replace NULL by: NULL

    and also make sure you use the same items during import into mysql.
    klaatu barada nikto

  7. #7
    Join Date
    Sep 2007
    Location
    malaysia
    Posts
    7
    Rep Power
    0

    Smile

    Alhamdulillah. saya dh dapat solution dgn cara import dalam .sql. di server oracle sy guna software toad untuk import data ker .sql. kemudian sy import masuk dalam mySQL. terima kasih kepada geng2 yg sudi membantu

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How do i display data from mysql database?
    By silentD in forum Website Programming
    Replies: 2
    Last Post: 14-01-2008, 10:16 AM
  2. ASP.NET - DataGrid Export to Excel - Alignment problem
    By genzy in forum Website Programming
    Replies: 2
    Last Post: 15-04-2007, 11:21 AM
  3. Whois Data Problem Report system
    By MENJ in forum Domain Names
    Replies: 1
    Last Post: 11-12-2004, 01:05 PM
  4. mcmana nak export excel ke mysql
    By poshberry in forum Website Programming
    Replies: 15
    Last Post: 04-06-2004, 04:29 PM
  5. Excel ke MySQL
    By baddai in forum Website Programming
    Replies: 2
    Last Post: 01-11-2003, 10:18 AM

Posting Permissions

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

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39