我是靠谱客的博主 羞涩山水,这篇文章主要介绍存储过程 Data truncation: Incorrect date value: ‘1988‘ for column ‘date‘ at row 1,现在分享给大家,希望可以做个参考。
最近写存储过程报错
网上搜都是说mysql sql脚本格式不对
我这里是存储过程,我在想时间也是对的啊,时间格式,为啥
原来的
SET updateSQL = CONCAT("INSERT INTO data_bi.bi_user_catch_partake_day_static(date, room_id, vip, user_type, fish_id, factor_type, acc_num, first_acc_num)
SELECT date, room_id, vip, user_type, fish_id, factor_type, count(account_id), count(if(is_new_acc = 1,account_id,null))
FROM data_bi.bi_user_catch_partake_day_active WHERE date = ", theTime, "
GROUP BY ", groupBySbStr, "
ON DUPLICATE KEY UPDATE acc_num = VALUES(acc_num),first_acc_num = VALUES(first_acc_num)");
call data_tslog.execute_sql(updateSQL);
大家有没有发现
其实少了引号,这里解析为2020-08-11,引号没有解析
SET updateSQL = CONCAT("INSERT INTO data_bi.bi_user_catch_partake_day_static(date, room_id, vip, user_type, fish_id, factor_type, acc_num, first_acc_num)
SELECT date, room_id, vip, user_type, fish_id, factor_type, count(account_id), count(if(is_new_acc = 1,account_id,null))
FROM data_bi.bi_user_catch_partake_day_active WHERE date = '", theTime, "'
GROUP BY ", groupBySbStr, "
ON DUPLICATE KEY UPDATE acc_num = VALUES(acc_num),first_acc_num = VALUES(first_acc_num)");
call data_tslog.execute_sql(updateSQL);
希望能帮到你,我的博客:idearyou.cn
最后
以上就是羞涩山水最近收集整理的关于存储过程 Data truncation: Incorrect date value: ‘1988‘ for column ‘date‘ at row 1的全部内容,更多相关存储过程内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复