I hope you never have two sales representatives who have the same initials.
In addition, sorting and filtering are two completely different things. You are talking about sorting in the title of the question and the first paragraph, but your question is about filtering. Since you can simply ORDER BY in the field, and in any case it will use the first two characters, I will give you an answer to the filtering part.
You do not mention your RDBMS, but this will work in any product:
SELECT my_columns FROM My_Table WHERE sales_rep LIKE 'BS%'
If you use a variable / parameter, then:
SELECT my_columns FROM My_Table WHERE sales_rep LIKE @my_param + '%'
You can also use:
LEFT(sales_rep, 2) = 'BS'
I would stay away from:
SUBSTRING(sales_rep, 1, 2) = 'BS'
Depending on your SQL engine, it may not be smart enough to realize that it can use the index on the latter.
Tom h source share