I wanted to replace only the values in fields of one column,
but that deleted the values in all other columns... :-(
I noticed, that import generated this sql query:
LOAD DATA LOCAL INFILE 'D:\\1aDesktop\\dataset-table_field-data2_1.csv' REPLACE INTO TABLE `form4`.`dataset` FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' (`dataset_id`,`data2_1`)
Previously I had success with inserting this sql comand
directly in the SQL tab:
UPDATE `dataset` SET `data1_5`='my data blah'
that updated all fields in the "data1_5" column with the same data and that was what I needed.
But now I need to update the fields individually.
I've read, there must be additionally a "WHERE" command in that sql query to achieve that.
But I can't figure out, how exactly this WHERE command must be in order to make it work?
Can someone please help?
Ideally I would like to load the data from a csv file and then
update the fields.
So, I guess the sql query would similar to this:
LOAD DATA LOCAL INFILE 'D:\\1aDesktop\\dataset-table_field-data2_1.csv' FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' UPDATE `dataset` SET `data2_1` WHERE `data2_1`= ......????
Thanks.