【发布时间】:2020-07-15 20:26:14
【问题描述】:
:我正在尝试使用 JSON 的一部分作为 where in 子句的过滤器,如下所示:
declare @json nvarchar(max) =
'[{
"brand_name": {
"key": "Brand Name",
"value": "''alpha'',''omega''"
}
}]';
select *
from someTable
where column in (select json_value(@json, '$[0].brand_name.value'));
如何将value 转换为 where-in 参数?
【问题讨论】:
标签: json sql-server where-clause where-in