salix/back/methods/edi/sql/bucket.sql

15 lines
488 B
MySQL
Raw Normal View History

LOAD DATA LOCAL INFILE ?
INTO TABLE bucket
FIELDS TERMINATED BY ';'
LINES TERMINATED BY '\n' (@col1, @col2, @col3, @col4, @col5, @col6, @col7, @col8, @col9, @col10, @col11, @col12)
SET
bucket_id = @col2,
bucket_type_id = @col4,
description = @col5,
x_size = @col6,
y_size = @col7,
z_size = @col8,
entry_date = STR_TO_DATE(@col10, '%Y%m%d'),
expiry_date = IFNULL(NULL,STR_TO_DATE(@col11, '%Y%m%d')),
change_date_time = STR_TO_DATE(@col12, '%Y%m%d%H%i')