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!

Case Sensitive Query

Status
Not open for further replies.

dalebeitz

Programmer
Oct 3, 2001
20
0
0
US
Greetings!

I have a table where names are stored in mixed case. I also have a lookup form where the user can type in a name for which to search, this in turn drives a query that populates a result form. In order to eliminate case from the equation, I'd like to convert everything to uppercase during the search. I know the UCASE function acts on a variable, but is there a SQL function that works in a similar fashion? I'm trying to build a SQL statement like the following:
Code:
mySQL = "select * from tbl_names where upper(last_name) = '" & UCASE(UserEnteredName) & "'"
The "upper" function is something I recall from my Oracle days, and it doesn't work in Access. I can't use UCASE in place of upper since it doesn't appear to be valid SQL either.

Any ideas appreciated.
Dale Beitz
dale.beitz@agreliant.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top