Count the occurrences of characters in a string, stored in our SQL Server Database.
DECLARE @longWord varchar(28)='Thisissqlanddotnetdevelopment'
SELECT CountCharacters = DATALENGTH(@longWord)- DATALENGTH (REPLACE(REPLACE(LOWER(@longWord),'a',''),'i',''))
No comments:
Post a Comment