SELECT JsonData.out_batch_no,JsonData.openid,” a,” b,CONVERT(FLOAT,JsonData.total_amount*1.0/100) money,’补发’ remark, ROW_NUMBER() OVER(ORDER BY NEWID()) sn
FROM # a
CROSS APPLY OPENJSON(requestMsg)
WITH (
out_batch_no varchar(255) ‘$.out_batch_no’,
total_amount int ‘$.total_amount’,
openid varchar(255) ‘$.transfer_detail_list[0].openid’
— batch_name VARCHAR(100)
) AS JsonData