This is the command I am having problems with and the error that I am getting.
What follows is some things I did to troubleshoot this problem. I can't see
any problems with the SQL and as I note below, the line works fine when I
apply it to the DB after getting the error. Help!
[root@Casey root]# mysql -u root -p < po_file
Enter password:
ERROR 1064 at line 950282: You have an error in your SQL syntax near
'020750000030009219','09','20','35','N',' ',00013,'
',000000.9500,000000.6318,'' at line 1
/* This is the line before the error occurs and the command used to get it.*/
[root@Casey root]# cat -n po_file | grep 950281 | more
950281 INSERT INTO comment_lines
VALUES('020750000030009219','09','20','35','N'
,' ',00002,'REQUISITIONED BY BILLYBOB
');
/* Here is the bad line 950282 below. I put it into it's own test file and
tried the command line again. Didn't get an error (with empty and all
previous data. */
[root@Casey root]# cat test.sql
use purchase_orders;
INSERT INTO comment_lines VALUES('020750000030009219','09','20','35','N'
,' ',00003,' ');
/* This is the line after the error occurs and the command used to get it.*/
[root@Casey root]# cat -n po_file | grep 950283 | more
950283 INSERT INTO comment_lines
VALUES('020750000030009219','09','20','35','N'
,' ',00004,' ');
mysql> describe comment_lines;
+-------------------+-----------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+-----------------------+------+-----+---------+-------+
| po_index | varchar(18) | | PRI | | |
| batch_month | char(2) | | PRI | 0 | |
| batch_day | char(2) | | PRI | 0 | |
| batch_number | char(2) | | PRI | 0 | |
| changed_indicator | char(1) | | | | |
| maintenance_code | char(1) | | | | |
| line_number | mediumint(5) unsigned | | PRI | 0 | |
| comment | varchar(40) | | | | |
+-------------------+-----------------------+------+-----+---------+-------+
root@Casey root]# ls -al po_file
-rw-r--r-- 1 root root 468787771 Dec 2 20:56 po_file
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php