Import concatenated field values with separator

[expired user #9166]'s profile image [expired user #9166] posted 8 years ago in Import/Export Permalink

Hello,

trying to import a source character value in a character field that should be split by a <minus> "-" with following syntax fails:

LOAD DATA LOW_PRIORITY LOCAL INFILE 'C:\Temp\if.csv' REPLACE INTO TABLE test.Data FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES (DataString) (@Col0) SET Col0 = CONCAT((SUBSTR(@ColVar0,1,4),'-',SUBSTR(@ColVar0,5,7));

Any help about that issue appreciated. Thanks in advance.

Regards Uli

Please login to leave a reply, or register at first.