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

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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, 1999, 04:26 PM
vbedceo
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I am sure mySQL allows this method. Could you guide me how I can update/insert into a table mySQL using a text file. My text format is using "delimiter", just like it is used in .htpasswd file from Apache.

My file is stored under my home directory (/home/www/test.dat)

Thanks!

Reply With Quote
  #2  
Old September 29th, 1999, 05:02 PM
DesertFox
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hi.

Check out the "LOAD DATA" command.

You might use something like:

load data infile '/home/www/test.dat' into table <mytable> fields terminated by '<delimiter>';

Reply With Quote
  #3  
Old October 5th, 1999, 02:08 PM
BobB
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I found something very similar to work, but had to include LOCAL in the SQL statement if the file was not directly on the MySQL server. My text file was tab delimited so I apparently did not need to specify the delimiter. SQL I used was like:

LOAD DATA LOCAL INFILE '/home/www/textfile.txt' INTO TABLE tablename

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > mySQL tables from text files?

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap