我Transactions
在 SQL Server 表中有一个列A
。
我在该表中有大约 1000 行,并且在每一行中我都有字符串,这些字符串具有
"@transaction --space of 3 characters---1" or "@transaction --space of 3 characters---0" these strings may be even repeated n number of times within the single row.
结果 - 我想检查所有
"@transaction --space of 3 characters---1" ones how many times repeated.
"@transaction --space of 3 characters---0" zeros how many times repeated.
我尝试了诸如
Select * from A where transaction like '%@transaction --space of 3 characters---1%
Select * from A where transaction like '%@transaction --space of 3 characters---0%
但是这些不能给我想要的结果,因为单列中可能有更多的上述字符串。
谁能建议如何分别计算以 1 和 0 结尾的所有这两个字符串?
提前致谢