gpt4 book ai didi

mysql - LOAD DATA LOCAL INFILE 正在产生空值,其中小时为 00

转载 作者:IT王子 更新时间:2023-10-28 23:49:50 27 4
gpt4 key购买 nike

LOAD DATA LOCAL INFILE 在小时为 00 时产生空值。只有最后两行导入正确有人可以帮帮我吗

查询:

LOAD DATA LOCAL INFILE 'test.csv' 
INTO TABLE stats.Counters_ACTIVEUE
FIELDS TERMINATED BY ","
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY "\n"
IGNORE 1 LINES
(@varTimeSt,NOMINAL,CELL_ID,IPLATEDL_MS_QCI_9,PDCPSDUDELAY_MSEC_QCI_9,UEACTIVEUL_COUNT_QCI_9,
UEACTIVEDL_COUNT_QCI_9) SET DAY = STR_TO_DATE(@varTimeSt,'%m/%d/%Y %h:%i');

数据:

DAY,NOMINAL,CELL_ID,IPLATEDL_MS_QCI_9,PDCPSDUDELAY_MSEC_QCI_9,UEACTIVEUL_COUNT_QCI_9,UEACTIVEDL_COUNT_QCI_9
"09/05/2016 00:00",CE0001,cNum6,5.17,58.285,0.5725,0.9275
"09/05/2016 00:00",CE0001,cNum7,4.9025,40.385,0.17,0.235
"09/05/2016 01:00",CE0001,cNum8,1.8075,23.58,0.2175,0.8925
"08/30/2016 01:00",CE0001,cNum1,5.295,16.34,0.0875,0.17

最佳答案

%h 是 12 小时制中小时的格式代码。这种格式的小时必须在 1-12 范围内;不能为 0。

由于您的时间似乎是 24 小时格式,您可能需要 %H。这也应该可以解决您在 12:59 之后遇到的任何问题。

关于mysql - LOAD DATA LOCAL INFILE 正在产生空值,其中小时为 00,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39371462/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com