Re: Null values are replaced with zeros in infile.
...try this one -
LOAD DATA LOCAL INFILE 'C:/orders.csv'
INTO TABLE `order`
FIELDS TERMINATED BY ','
ESCAPED BY '\'
LINES TERMINATED BY '\n' IGNORE 1 LINES
(row_id,
cust_name,
Addr,
item_name,
@var1,
@var2
)
SET order_value = IF(@var1 = '', NULL, @var1),
SET quantity = IF(@var2 = '', NULL, @var2)
Devart Company,
MySQL management tools
http://www.devart.com/dbforge/mysql/
Subject
Written By
Posted
December 08, 2011 05:53AM
December 08, 2011 08:13AM
December 09, 2011 08:49AM
December 09, 2011 09:14AM
Re: Null values are replaced with zeros in infile.
December 09, 2011 09:17AM
December 11, 2011 01:01AM
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.