截断的双精度值不正确:'-'

vlju58qv  于 2021-06-17  发布在  Mysql
关注(0)|答案(1)|浏览(652)

我是mysql的新手。我想把两个专栏和 - 然而,在两者之间,我得到了错误。如果有人能给我建议,我将非常感激。我在这一部分遇到了错误: ,x_end_year +"-" +x_start_month+"-01", 错误代码:1292截断了不正确的双精度值:'-'

INSERT INTO earning (id, dateCreated, dateModified, x_t_name, x_start_date, 
                     x_end_month, x_address, x_category, x_pic, x_promo_space, 
                     x_start_month, x_space_query, x_organizer, x_end_date, 
                     x_address_query, x_current_pic, x_start_year, x_end_year,
                     x_event_title, x_pix_name),

SELECT x_idx, dateCreated, dateModified, "" , x_end_year +"-" +x_start_month+"-01",
       x_end_month, "address1", "", x_current_pic, "", x_start_month, "''", "", 
       x_end_year +"-" +x_end_month+"-01", "'address1'", x_current_pic, x_end_year, 
       x_end_year, "", ""
FROM Sale
WHERE id = 'x1'
pbgvytdp

pbgvytdp1#

你只需要使用concat。这是一个样品。

SELECT CONCAT (column1, column2, '-', column3, column4)

相关问题