Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting Letters in a Name

Status
Not open for further replies.

avw

Technical User
Jun 14, 2003
6
US
I have tried this in numerous Data Bases with no luck.

Suppose: I have a name that contains the letter "I" such as Blaine.
I want to count the letters but make the "I" count as a "half" letter. In other words Blaine would be totaled as 5.5 letters.

Any ideas?
 
Result = 0.5 * ((length(name) * 2 ) - patterncount(name, "l"))

Cheers,
Paul J.
 
Paul,

Many thanks for the help. I had just begun reading the info on "pattern" when I seen your answer.

This helps immensely.

Marion
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top