Sai Reddy

Sai Reddy

  • NA
  • 214
  • 31.7k

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)