更新时间:2022-04-11 08:19:08
SELECT LEN(RequestedReportParams) - LEN(REPLACE(RequestedReportParams, ',', ''))
FROM YourTable
WHERE .....
这只是将列的长度与逗号进行比较,将值的长度与删除逗号进行比较,以得出差异(即逗号的数量)
This is simply comparing the length of the column with the commas, with the length of the value with the commas removed, to give you the difference (i.e. the number of commas)