LOAD DATA INFILE ERROR 1172 (42000)
Posted by: eric tse
Date: November 20, 2017 04:46PM

Hi,

I am trying to load a data file into database table


mysql> LOAD DATA INFILE 'SERVER.dmz.reg' replace INTO TABLE ServerIPs FIELDS TERMINATED BY '|' (regip, server);

I got following error

ERROR 1172 (42000): Result consisted of more than one row

If I only load one line of data inside the file. I can do it. Two rows start to throw this error


+-----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+-------------+------+-----+---------+-------+
| regip | varchar(15) | NO | PRI | NULL | |
| server | varchar(20) | YES | | NULL | |
| lbip | varchar(15) | YES | | NULL | |
| used | varchar(1) | YES | | NULL | |
| balance | varchar(25) | YES | | NULL | |
| keepalive | varchar(30) | YES | | NULL | |
+-----------+-------------+------+-----+---------+-------+

Data file
142.xx.xxx.x|server.dmz
142.xx.xxx.xx|server.dmz

I can load the whole file into the development database, but not the production one.

Can you please help?

Options: ReplyQuote


Subject
Written By
Posted
LOAD DATA INFILE ERROR 1172 (42000)
November 20, 2017 04:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.