Thread: Import

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

    Join Date
    Aug 2000
    Colombo, Western, Sri Lanka
    Rep Power
    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
    Devshed Newbie (0 - 499 posts)

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


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

    and that should do it

    Darren $

Similar Threads

  1. Processing XML with XSL
    By GSB in forum XML Programming
    Replies: 0
    Last Post: December 14th, 2003, 07: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, 10: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, 08:42 AM
  4. import question
    By progkcp in forum Java Help
    Replies: 1
    Last Post: October 29th, 2002, 03:31 PM
  5. import DBF into SQL... PLEASE HELP!!
    By rynop2000 in forum MySQL Help
    Replies: 1
    Last Post: November 27th, 2000, 12:59 AM

IMN logo majestic logo threadwatch logo seochat tools logo