Forums
This topic is locked
Search table using partial words instead of full..
05 Feb 2002 12:54:17 b w posted:
I am trying to create a search for a name in the table. Instead of typing the full name i.e superman. I want to be able to type super and have the list of names come up.So far I have something like this
SELECT *
FROM Employee
WHERE Name LIKE 'partName*'
in UD4 recordset.
Name Default ValueRuntime Value
======== =========== ====================
partName 1 Request.Form("txtName"
I usually get an error saying it is EOF or no recordset exists.
Anyone with a tip?
Replies
Replied 05 Feb 2002 18:06:20
05 Feb 2002 18:06:20 Kent Steelman replied:
You may need to change the "*" to "%" which I think is the typical wildcard for SQL
Wm. Kent Steelman
Wm. Kent Steelman
Replied 05 Feb 2002 18:11:41
05 Feb 2002 18:11:41 Chris Neville replied:
Yes, if you surrond your variable with the "%" wildcard, it will search the entire string.
e.g. - "%variable%" will return "UDW4" for a search of "D" or "4" or whatever...
"variable%" will return "UDW4" for a search of "U" but NOT of "D"
e.g. - "%variable%" will return "UDW4" for a search of "D" or "4" or whatever...
"variable%" will return "UDW4" for a search of "U" but NOT of "D"
Replied 06 Feb 2002 02:46:37
06 Feb 2002 02:46:37 b w replied:
Awesome! It works like a charm. Thanks Guys!