MySQL中Data truncation: Invalid JSON text in argument 1 to function json_extract: "The document is empty." at position 0.问题解决

问题描述:

json格式不规范导致的,仅使用where+json_valid清洗似乎并不足以解决问题。该问题发生于MySQL中

解决方法:

select order_number,sku_code,CASE WHEN JSON_VALID(sales_price) THEN sales_price ELSE null END as sales_price from order_goods_snapshot
posted @ 2023-10-26 17:41  森夏  阅读(3310)  评论(0)    收藏  举报