Forums
This topic is locked
Search table using partial words instead of full..
23 years ago 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 23 years ago
23 years ago 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 23 years ago
23 years ago 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 23 years ago
23 years ago b w replied:
Awesome! It works like a charm. Thanks Guys!