我有问题。 写了一个文件加载器
load data local infile '/home/streamsadmin/LandingZone/Susbet/Data/Bets/bets_0.txt' into table bet_temp
FIELDS OPTIONALLY ENCLOSED BY '"' TERMINATED BY ','
lines terminated by '\n'
ignore 1 lines
(bet_id,Bet_Type,Market_Code,Bet_DateTime,Event_Code,Game_Part,Bet_Slip,Bet_Stakes,Pre_Or_Live,Potential_Return,Price,`Return`)
SET `Bet_DateTime`= STR_TO_DATE(@var1, '%d/%m/%Y %H:%i:%s'),
`Bet_slip` = FLOOR(1 + (RAND() * 15));
在工作台中,正确加载日期,在linux MySQL终端中
Mysql>
相同的文件加载器为Bet_DateTime字段返回NULL。
+--------+----------+-------------+--------------+------------+-----------+----------+------------+-------------+------------------+-------+--------+---------+
| bet_id | Bet_Type | Market_Code | Bet_DateTime | Event_Code | Game_Part | Bet_Slip | Bet_Stakes | Pre_Or_Live | Potential_Return | Price | Return | user_id |
+--------+----------+-------------+--------------+------------+-----------+----------+------------+-------------+------------------+-------+--------+---------+
| 1 | 1 | 7 | NULL | 3 | | 11 | 11.6936 | Pre | 0.0000 | 1 | 0.0000 | 274 |
| 2 | 3 | 2 | NULL | 19 | | 11 | 5.5459 | Live | 0.0000 | 5 | 0.0000 | 274 |
| 3 | 3 | 3 | NULL | 4 | | 8 | 6.1071 | Live | 0.0000 | 7 | 0.0000 | 986 |
| 4 | 3 | 5 | NULL | 9 | | 6 | 7.9694 | Live | 0.0000 | 2 | 0.0000 | 445 |
| 5 | 5 | 4 | NULL | 1 | | 5 | 6.9364 | Live | 0.0000 | 2 | 0.0000 | 56 |
我该如何解决这个问题?它是完全相同的查询