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 / amit kumar

firstaly take string in any variable. then index with start(')
and end(');then u got the full string length. after that u
substring one character and add (:1) and so on to reach the
last character..

and finally u get result.

bye

Is This Answer Correct ?    3 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between count (*) and count column?

533


What is faster join or union?

610


How many tables can be joined in SQL Server?

598


What are different types of schemas?

525


How do you rebuild an identity column?

559






Mention the uses of stored procedures.

581


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?

569


Your table has a large character field there are queries that use this field in their search clause what should you do?

512


What options are there to delete rows on the publisher and not on the subscriber? : sql server replication

693


What is a fan-out query in SQL Azure?

99


Can we call stored procedure in view in sql server?

506


how would you troubleshoot blocking? : Sql server database administration

529


What is store procedure? How do they work?

591


What is a recursive stored procedure in sql server?

580


Explain the relational database management system (rdbms)?

538