Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 CUSER and Stored Proceedure

Author  Topic 

shafiqkr
Starting Member

7 Posts

Posted - 2011-09-06 : 04:23:49
i want to search the no of characters in a field and to show the record having more characters matched.
how i can do these steps in stored proceedure

1)load all record
2)loop all records and check number of matching charactes
3)return the records having more matched


lappin
Posting Yak Master

182 Posts

Posted - 2011-09-06 : 06:41:41
Here is an example to show the number of characters and the rows with more than 10 characters:

select fieldA, LEN(FieldA) as lengthofField
from myTable
where LEN(FieldA)>10
Go to Top of Page
   

- Advertisement -