At 2:53 -0700 5/11/02, impala wrote:
>Hi
>
>I would like a person to search for a surname. If for
>example you have the surnames "Clark", "Williams" and
>"Wilcox" in the database.
>
>e.g. If the person search just for "Wil" the surnames
>"Williams" and "Wilcox" must be displayed. If the
>person se
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 disp
Replace your sql select query with these lines:
SELECT LASTNAME, FIRSTNAME, DEPARTMENT
FROM EMPLOYEES WHERE LASTNAME LIKE '%varLastName%'
It makes caseinsensitive search, so when varLastName is 'C'
it will find Clark and Wilcox ,because they contain letter 'C'.
Also you can use 'varLastName%' to
G'day Nic
> Just by typing part of the word ,how can I make a
> search in databse possible by using something like
> SELECT in SQL?
Seems like you just need the % wildcard character
SELECT LASTNAME, FIRSTNAME, DEPARTMENT FROM EMPLOYEES WHERE LASTNAME LIKE
"%searchdata%";
cheers
kim
Hi
I would like a person to search for a surname. If for
example you have the surnames "Clark", "Williams" and
"Wilcox" in the database.
e.g. If the person search just for "Wil" the surnames
"Williams" and "Wilcox" must be displayed. If the
person search just for "C" the surname Clark must be
d