Need Help Fetching Records between a range of Last Names starts with Letter

Need Help Fetching Records between a range of Last Names starts with Letter

Hello,

I want to use the Bulk Mail example script but convert it to sendmail to a range of start with letters. For example: sendmail if records fetched Last_Name startswith A through L. 

Example Bulk Email Code:

  1. emp  =  Employees[(age > input.age_1 && age < input.age_2)];
  2. users = "";
  3. for each x in emp
  4. {
  5.     sendmail
  6.     (
  7.         To       :  x.Email 
  8.         From     :  zoho.adminuserid 
  9.         Subject  :  "welcome" 
  10.         Message  :  "" 
  11.     )
  12.     users = users + " -------- " + x.Email;
  13. }
  14. info "mail sent to the following users :" + users;
I have tried everything I can think of but none of my scripts work. Do I need to convert the first letter to a number and then use greater than and less than comparison?

If so, how do I convert a letter to a number?

Thanks,

Bryan