impala, Saturday, May 11, 2002, 12:53:20 PM, you wrote: i> I would like a person to search for a surname. If for i> example you have the surnames "Clark", "Williams" and i> "Wilcox" in the database.
i> e.g. If the person search just for "Wil" the surnames i> "Williams" and "Wilcox" must be displayed. If the i> person search just for "C" the surname Clark must be i> displayed. i> I have something like: SELECT LASTNAME, FIRSTNAME, i> DEPARTMENT FROM EMPLOYEES WHERE LASTNAME LIKE i> 'varLastName' i> But then you have to enter the whole word. If you i> search for "Clark" you need to type in the whole word i> "Clark". i> Just by typing part of the word ,how can I make a i> search in databse possible by using something like i> SELECT in SQL? You should use wildcard '%' in LIKE clause, look at: http://www.mysql.com/doc/P/a/Pattern_matching.html i> Thanks i> Nic -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php