1】sql去重复
select * from View where SfzId in
(select SfzId from View group by SfzId having count(1)<2)
2】sql替换字符串
--将2222.222中的.替换 为
replace('2222.222','.','')
3】sql 找到指定的字符/字符串位置
SELECT PATINDEX('%.%','2222.111.221')
--输出结果 因为第一个.的下表是5
4】sql 类型转换
convert(int,A0225)=》把nvarchar转化为int