Thanks Michael - I was being a putz wasn't I!
You have a file of SQL statements. LOAD DATA INFILE is for importing a file of data (comma-separated, for example), not for reading a SQL file. You can do this from the command line with
mysql name_of_db </tmp/updates.txt
or within the mysql client program with
source '/tmp/updates.txt';
Michael
J S wrote:
Hi,
I'm trying to load a file containing a set of updates e.g.
UPDATE url_table SET hits=3 WHERE url="http://cache.unicast.com/java60/HTMLad_utils/ad2applet.js";
UPDATE url_table SET hits=2 WHERE url="http://abclocal.go.com/images/wabc/2003/wabc_images_whatsonseven.gif";
UPDATE url_table SET hits=2 WHERE url="http://images.thestreet.com/tsc/hd_img/tscw2.gif";
UPDATE url_table SET hits=2 WHERE url="http://newsimg.bbc.co.uk/nol/shared/fds/hi/business/market_data/img/maps/israel.gif";
UPDATE url_table SET hits=2 WHERE url="http://www.resortvacationstogo.com/images/banners/country_3.gif";
UPDATE url_table SET hits=2 WHERE url="http://www.nyc.gov/html/hpd/gif/nyclogo.jpg";
UPDATE url_table SET hits=2 WHERE url="http://news.bbc.co.uk/sportacademy/img/nav_icons/cricket_on.gif";
using the following SQL statement
LOAD DATA INFILE '/tmp/updates.txt' INTO TABLE url_table; Query OK, 6326 rows affected (0.23 sec) Record: 6326 Deleted: 0 Skipped: 0 Warnings: 25304
I tried SHOW WARNINGS; but mysql (version 4.0.15) said it was a syntax error. Is there any other way to see the warnings?
Thanks for any help. Is there anything obviously wrong that I'm missing here?
JS.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
_________________________________________________________________
Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]