How can count the string ?
for ex: If i have string like 'bhaskar' then i need like
b:1
h:1
a:2
s:1
k:1
r:1
please give any idea on that
Answer Posted / major
Private Sub Form_Load()
Dim Str As String
Str = "Bhaskar"
Fetch Str
End Sub
Public Sub Fetch(Str As String)
Dim StrNew As String
StrVal1 = Str: StrNew = Str
While StrNew <> ""
StrNew = Replace(Str, Mid(Str, 1, 1), "")
Debug.Print Mid(Str, 1, 1) & Len(Str) - Len(StrNew)
Str = StrNew
Wend
End Sub
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
What is the preferred way to create a clustered and non-clustered index? Which index should you create first the clustered or non-clustered?
What are the restrictions applicable while creating views? : SQL Server Architecture
What are the different methods available under sqlcommand class to access the data?
What is GUID in sql server?
Why we use functions in sql server?
Why do we use trigger?
What is pessimistic concurrency?
What is set nocount on and what is set nocount off?
What are the differences between lost updates and uncommitted dependencies?
What is a select query statement in ms sql server?
How many types of local tables are there in sql server?
As a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this?
How efficient you are in oracle and SQL server?
What is the default value of an integer data type in sql server 2005?
What is forward - only cursors / read only cursor?