提问人:Fabio 提问时间:7/27/2023 最后编辑:slaaksoFabio 更新时间:7/27/2023 访问量:39
MYSQL可选地通过无法正常工作来封闭
MYSQL optionally enclosed by not working correctly
问:
早上好。
如果我运行此过程,“可选括自”选项还会将数据和小数字段放在“”之间(我检查了 db 和 cls。DATA_INIZIO,cls。DATA_FINE真的是 DATE 和 cls。PREZZO 是十进制)。
SELECT 'CLI_CODICE', 'TS1_CODICE', 'TS3_CODICE', 'ART_CODICE', 'DATA_INIZIO', 'DATA_FINE', 'PREZZO', 'TSM_CODICE'
UNION ALL
SELECT cls.CLI_CODICE, cls.TS1_CODICE, cls.TS3_CODICE, cls.ART_CODICE, DATE_FORMAT(cls.DATA_INIZIO, '%d/%m/%Y'), DATE_FORMAT(cls.DATA_FINE, '%d/%m/%Y'), cls.PREZZO, cls.TSM_CODICE
FROM arc_0001.cls
WHERE (((cls.DATA_FINE)>=Now()))
INTO OUTFILE 'file.csv'
CHARACTER SET utf8mb4
FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n' ;
结果:
"CLI_CODICE";"TS1_CODICE";"TS3_CODICE";"ART_CODICE";"DATA_INIZIO";"DATA_FINE";"PREZZO";"TSM_CODICE"
"00055615";"";"310";"";"01/01/1990";"31/12/2999";"0.000000";"40"
"";"2";"310";"";"01/01/1990";"31/12/2999";"0.000000";"10"
"";"2";"311";"";"01/01/1990";"31/12/2999";"0.000000";"10"
"";"2";"312";"";"01/01/1990";"31/12/2999";"0.000000";"10"
"";"2";"420";"";"01/01/1990";"31/12/2999";"0.000000";"10"
"";"2";"421";"";"01/01/1990";"31/12/2999";"0.000000";"10"
"";"2";"422";"";"01/01/1990";"31/12/2999";"0.000000";"10"
如何在没有“”的情况下正确导出 DATE 和 DECIMAL 字段?
例:
"CLI_CODICE";"TS1_CODICE";"TS3_CODICE";"ART_CODICE";"DATA_INIZIO";"DATA_FINE";"PREZZO";"TSM_CODICE"
"00055615";"";"310";"";01/01/1990;31/12/2999;0.000000;"40"
谢谢
答: 暂无答案
评论