salix/back/methods/edi/sql/plant.sql

12 lines
402 B
MySQL
Raw Permalink Normal View History

LOAD DATA LOCAL INFILE ?
2022-06-03 10:44:39 +00:00
INTO TABLE `edi`.`plant`
FIELDS TERMINATED BY ';'
LINES TERMINATED BY '\n' (@col1, @col2, @col3, @col4, @col5, @col6, @col7, @col8, @col9)
SET
plant_id = @col3,
genus_id = @col4,
specie_id = @col5,
entry_date = STR_TO_DATE(@col7, '%Y%m%d'),
expiry_date = IFNULL(NULL,STR_TO_DATE(@col8, '%Y%m%d')),
change_date_time = STR_TO_DATE(@col9, '%Y%m%d%H%i')