Sai Reddy

Sai Reddy

  • 1.7k
  • 201
  • 10k

Calculate sum alphabets with given string?

Jul 12 2018 7:03 AM
 I have a requirement as follows.
 a=1,b=2,c=3,d=4,e=5....etc
String=Praveen(passing it as parameter in stored procedure)
i need to calculate each character alphbitacal number and sum of them
ex: 1+15+30+9+1+2=58
result is 5+8=13
i need it as a stored procedure in mysql and sql server?

Answers (15)