#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    USA
    Posts
    67
    Rep Power
    15
    i have a database in ms access with fields including number, money, and text. i want this to be on mysql.

    i have tried using the export function to get it into a tab deliminated txt file and then inserting data, but text fields comeout having quotes around them, and some fields have a 0 instead of the number.

    how can i convert my table data from access to a txt file and make it look the same on the mysql server?
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    Hi David,

    How r u doing?,

    I don't have any idea about upsizing ms-access to Mysql(In Sqlserver we'll get upsizing wizard.Here also some tools must be their.Try to get some information from mysql support).

    But for txt to mysql you can use Load data statement insted of mysqlimport.

    LOAD DATA INFILE "C:mydiremp.txt" INTO TABLE emp;


    full syntax for LOAD Data:

    LOAD DATA INFILE 'emp.txt' INTO TABLE tbl_name FIELDS TERMINATED BY 't' ENCLOSED BY '"'LINES TERMINATED BY 'n';


    You can escape from '"' using;
    ESCAPED BY '"'


    Hope you may get some hint from this...





    [This message has been edited by Shiju Rajan (edited March 27, 2000).]
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    USA
    Posts
    67
    Rep Power
    15
    Hi Shiju

    im doing pretty good, im having tons of fun working with perl and mysql (much thanks to you and DEVSHED).

    I was able to resolve my problem with the decimal points. It appears that he file that ms access creates adds a $ to the decimal values, after i remove this $ then it works fine.

    Thanks for your help
  6. #4
  7. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    as a ridiculous aside - sad git that I am I have in the past (in frustration) exported MSaccess data into MSExcel and then exported that as a comma seperated file !!!! yes I am lazy (but it worked).

    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    USA
    Posts
    67
    Rep Power
    15
    ehhee i kind of was lazy too. i got the file exported to a txt file and then used word to search/replace all the $ signs and then imported into the mysql table

Similar Threads

  1. convert txt file into excel or access
    By go_tech in forum Visual Basic Programming
    Replies: 10
    Last Post: December 24th, 2003, 12:54 AM
  2. Generate Data Access Object in PHP for MySQL
    By ptesone in forum PHP Development
    Replies: 1
    Last Post: November 13th, 2003, 12:39 AM
  3. Replies: 1
    Last Post: June 25th, 2003, 03:33 PM
  4. export mysql data to a text file.
    By nlpan in forum MySQL Help
    Replies: 2
    Last Post: April 30th, 2003, 05:39 AM
  5. Access -> MySQL, data type convert on import
    By richardgmorris in forum MySQL Help
    Replies: 3
    Last Post: February 10th, 2003, 01:18 PM

IMN logo majestic logo threadwatch logo seochat tools logo