MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 28th, 2000, 04:42 AM
ranesh_w ranesh_w is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Colombo, Western, Sri Lanka
Posts: 41 ranesh_w User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
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.

Reply With Quote
  #2  
Old September 28th, 2000, 05:30 AM
Carpe Diem
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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/ £

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Import


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway