p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access VBA (http://p2p.wrox.com/forumdisplay.php?f=80)
-   -   VB SQL search similar records (http://p2p.wrox.com/showthread.php?t=40336)

Derek_05 March 24th, 2006 01:27 PM

VB SQL search similar records
 
Hi there

I am trying to seach for similar records in a database, so for example, if the user searches for 'Dere'
it will return records that are similar like:

Derrick
Dereck
Derick
Derik

I am attempting this with the following SQL :
SELECT UserName FROM Users WHERE 'derek' Like '%'

Nothing is returned unfotunately, any suggestions? Any help or adive will be much appreciated thanks.

derek



Bob Bedell March 24th, 2006 08:19 PM

Try:

SELECT UserName FROM Users WHERE UserName Like 'dere%'"

Will return only Dereck from you list.


HTH,

Bob



All times are GMT -4. The time now is 05:56 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.