I am familiar with basic usage of 'load data local infile' and importing specific columns only. What I want is however to import a single column from file based/related on data from another column. So if I have say a table with column names 'name' 'value' 'value1'... and a file with 'name' 'value1', can I load only 'value1' column which corresponds to 'name'? Note that 'name' in file is not ordered.
Peter, 5, ferrari
Alice, 2, fiat
John, 2, pontiac
Something like: LOAD DATA LOCAL INFILE "/home/file.csv" replace into table mytable fields terminated by "," optionally enclosed by '"' (@dummy,value1) where name=@col1;
Is there some way to do it?