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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL LIKE

Status
Not open for further replies.

mousematt

MIS
Feb 5, 2001
102
0
0
GB
Hope someone can help.

I have a table that contains user info, One field contains FullName, ie Joe Bloggs. I'm trying to bring back that user from
SELECT * FROM Users WHERE FullName LIKE 'joe'

and nothing comes back, am I doing something wrong?
 
Easy (I think)!
Use the % wildcard.

SELECT * FROM Users WHERE FullName LIKE 'joe%'
 
that was bloody quick and very easy, thanx it works now. :)
 
Try to run the select statement like this

SELECT * FROM Users WHERE FullName LIKE 'Joe%'
or
SELECT * FROM Users WHERE Upper(FullName) LIKE 'JOE%'

should hopefylly give you the results you've been looking for.

 
I like SG's suggestion, which definitely might be needed on a case-sensitive Server. (I think the default configuration is INsensitive??)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top