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

Wildcard in SQL string

Status
Not open for further replies.

Jusenkyo

Programmer
Aug 16, 2002
295
GB
Hello all

Just an easy one, ive forgotten how to to a fuzzy search in a SQL string. The code I have so far is:

cmd.CommandText = "SELECT [First Name] + ' ' + [Surname] as EmployeeName FROM dbo.qryEmployeeDetails Where [First Name] + ' ' + [Surname] = ('" & Username & "') "

I want to find all the matching names, even if they are spelt a little differently.

Any ideas?
Cheers!
J
 
Take a look at the Like operator.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Or for a more complete answer, look up Soundex algorithms.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top