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

发布时间 2023-10-26 17:47:32作者: 森夏

问题描述:

json格式不规范导致的,仅使用where+json_valid清洗似乎并不足以解决问题

解决方法:

select order_number,sku_code,CASE WHEN JSON_VALID(sales_price) THEN sales_price ELSE null END as sales_price from order_goods_snapshot