tsql json处理


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

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