access_asp thread: Using the LIKE operator in ASP SQL Statement
Message #1 by sysadmin@c... on Thu, 6 Mar 2003 02:57:32
|
|
I have a large database that I need to be able to pull records out of
depending on certain criteria.
What I have (it doesn't work) is the following code...
SELECT unitNumber, owner FROM projectList WHERE unitNumber LIKE 'ABCD*'
I'd like to be able to get users to enter upto 4 characters of the
unitNumber field and then it brings up all records that have those
characters starting the field..
I am using JavaScript..
Any help would be great..
thanks
Tony.
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 6 Mar 2003 15:44:12 +1100
|
|
www.adopenstatic.com/faq/likequeries.asp
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <sysadmin@c...>
Subject: [access_asp] Using the LIKE operator in ASP SQL Statement
: I have a large database that I need to be able to pull records out of
: depending on certain criteria.
: What I have (it doesn't work) is the following code...
:
: SELECT unitNumber, owner FROM projectList WHERE unitNumber LIKE 'ABCD*'
:
: I'd like to be able to get users to enter upto 4 characters of the
: unitNumber field and then it brings up all records that have those
: characters starting the field..
:
: I am using JavaScript..
: Any help would be great..
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by graham@r... on Fri, 7 Mar 2003 07:44:19
|
|
Try using the following code :
SELECT unitNumber, owner FROM projectList WHERE unitNumber LIKE 'ABCD%'
You may find that that will help.
Graham Traas
|