Watch on YouTube
Here i am counting number of "," (commas) in string
Declare @string varchar(1000)
Set @string = 'a, b, c, d'
Select len(@string) - len(replace(@string,
',', ''))
Here I am counting number of "a" in string
Declare @string varchar(1000)
Set @string = 'a, b, c, d'
Select len(@string) - len(replace(@string,
'a', ''))
No comments:
Post a Comment