1-Get Index of character
select CHARINDEX('FindWhat','String expression')
select CHARINDEX('1','0001')
Result-4
2- Get character of particular Index
select CHARINDEX('FindWhat','String expression',Index)
select CHARINDEX('1','000000000',1)
Result-0
select CHARINDEX('1','100000010',1)
Result-1
select CHARINDEX('1','100000010',2)
Result-8
select CHARINDEX('FindWhat','String expression')
select CHARINDEX('1','0001')
Result-4
2- Get character of particular Index
select CHARINDEX('FindWhat','String expression',Index)
select CHARINDEX('1','000000000',1)
Result-0
select CHARINDEX('1','100000010',1)
Result-1
select CHARINDEX('1','100000010',2)
Result-8
No comments:
Post a Comment