I have the following table and sql commands. The number of fields in the file is different from that of the schema. And the last line should not contain null. But there are only warnings but not errors generated. I'm wondering how to generate errors instead of warnings.
~/linux/test/mysql/mysql/LOAD_DATA/csv$ mysqllocalhostpengy.sh /Applications/MAMP/Library/bin/mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 45 Server version: 5.5.9 Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Database changed mysql> CREATE TEMPORARY TABLE test ( -> id INTEGER -> , name VARCHAR(3) NOT NULL -> ); Query OK, 0 rows affected (0.02 sec)
mysql> load data local infile 'table.csv' into table test FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'; -- ESCAPED BY '"'; Query OK, 5 rows affected, 7 warnings (0.03 sec) Records: 5 Deleted: 0 Skipped: 0 Warnings: 7
-- Regards, Peng
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=listsearcharchive@lassosoft.com
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!