我不确定这个错误是什么!
#1292 - Truncated incorrect DOUBLE value:
Run Code Online (Sandbox Code Playgroud)
我没有双值字段或数据!
我浪费了整整一个小时试图解决这个问题!
这是我的查询
INSERT INTO call_managment_system.contact_numbers
(account_id, contact_number, contact_extension, main_number, created_by)
SELECT
ac.account_id,
REPLACE(REPLACE(REPLACE(REPLACE(ta.phone_number, '-', ''), ' ', ''), ')', ''),'(','') AS Phone,
IFNULL(ta.ext, '') AS extention,
'1' AS MainNumber,
'2' AS created_by
FROM
cvsnumbers AS ta
INNER JOIN accounts AS ac ON ac.company_code = ta.company_code
WHERE
LENGTH(REPLACE(REPLACE(REPLACE(REPLACE(ta.phone_number, '-', ''), ' ', ''), ')', ''),'(','') ) = 10
Run Code Online (Sandbox Code Playgroud)
这是我的show create table,用于表格的结果
CREATE TABLE `contact_numbers` (
`number_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account_id` int(10) …Run Code Online (Sandbox Code Playgroud)