Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Between

Status
Not open for further replies.

shangrilla

Programmer
Nov 21, 2001
360
0
0
US
I am trying to get data where lastName falls between 2 values eg: A thru E. This would only give me data where lastNames are from A thru D.

I am using BETWEEN val1 and val2
Can I modify this statement or use something else to include lastNames starting with E also.

Thanks
 
Your criteria would return someone with a last name of only E. Its the letters than follow the E that are giving you grief. Try this:
Code:
BETWEEN val1 and val2+'Z'


--Angel [rainbow]
-----------------------------------
Every time I lose my mind, I wonder
if it's really worth finding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top