Thread: Import

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

    Join Date
    Aug 2000
    Location
    Colombo, Western, Sri Lanka
    Posts
    41
    Rep Power
    15
    How can I import data from a .txt file (delimited) to a mysql table??

    Please note that the txt file contains data for a few columns only.


    So if the mysql table contains 6 columns, the txt file contains data for 3 columns only.

    Please help. Thanks.
  2. #2
  3. No Profile Picture
    Carpe Diem
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi

    Make sure you have a backup first of your existing date just incase.

    Then

    load data infile 'filename' into table tablename (field1, field2 field3);

    and that should do it

    Regards
    Darren http://www.php4hosting.com/ $ http://www.php4hosting.co.uk/

Similar Threads

  1. Processing XML with XSL
    By GSB in forum XML Programming
    Replies: 0
    Last Post: December 14th, 2003, 08:55 AM
  2. compiling .java, thought I knew what I was doing?!
    By geoffgarcia in forum Java Help
    Replies: 10
    Last Post: September 9th, 2003, 11:56 AM
  3. Code works anywhere else but not on my machine
    By DSteenburg in forum Java Help
    Replies: 4
    Last Post: April 19th, 2003, 09:42 AM
  4. import question
    By progkcp in forum Java Help
    Replies: 1
    Last Post: October 29th, 2002, 04:31 PM
  5. import DBF into SQL... PLEASE HELP!!
    By rynop2000 in forum MySQL Help
    Replies: 1
    Last Post: November 27th, 2000, 01:59 AM

IMN logo majestic logo threadwatch logo seochat tools logo