Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 24th, 2006, 01:27 PM
Authorized User
 
Join Date: Dec 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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


 
Old March 24th, 2006, 08:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Try:

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

Will return only Dereck from you list.


HTH,

Bob






Similar Threads
Thread Thread Starter Forum Replies Last Post
Search a binary file of million records DineshGirij008 C# 18 July 17th, 2008 09:38 AM
Excluding certain records from a search RussLewis XSLT 5 March 4th, 2008 12:14 PM
Import Automation within Access similar to SQL DTS JTCrashOverride Access 1 November 14th, 2006 08:34 AM
Db Grid ( in VB6) similar in VB .net 2003 required venkikrao VB.NET 1 December 3rd, 2005 11:49 AM
Finding records containing similar text salman Classic ASP Databases 3 November 30th, 2004 10:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.