Quantcast
Channel: Classic ASP
Viewing all articles
Browse latest Browse all 488

Get Last Names Before First 2 Letters

$
0
0

I've been using the following with no issues to identify users with specifc parts of the alphabet

ElseIf  Left(rs_general("last_name"),1) <= "I" THEN

user_usrname = "FIRSTUSER"

But I need to separate the first two letters so that MA and below goes to the second user and MC and above goes to the third. When I try the following it just cuts off at M instead of MC.

ElseIf  Left(rs_general("last_name"),2) <= "MA" THEN

user_usrname = "SECONDUSER"

ElseIf  Left(rs_general("last_name"),2) >= "MC" THEN

user_usrname = "THIRDUSER"


Viewing all articles
Browse latest Browse all 488


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>