Hello Folks,
I was told to research a way to search for names, as I type each alphabet on the front end (text box) in an incremental fashion. Assuming I have an EMP table with FIRSTNAME, LASTNAME columns.
Let me explain.
1. For example, when I type 'A' I need a list of, say 10 names that start with 'A'. When I add 'D' (AD) I want the search to updated with all names starting with 'AD'.
Is there a SQL or PKG or Utility, I can utilize to simulate this feature. Is there anything that's similar to this type of search.
2. Using LIKE or REG-EXP I can do a search and limit the results to bring only the first 10 records using Rownum < 11. But if my table has say 1000 names that start with 'AD', will the following query get all the 1000 records from DB blocks and then pick the first 10.
Select LASTNAME ||', '|| FIRSTNAME from EMP where name like 'AD%' and rownum < 11
3. Even if the above query is fast, I feel the query will have to be called for each alphabet entry and every backspace. Which sure will be slow and heavy on the system. My current search is using the SOUNDEX Algorithm, but the clients want this new feature.
Kindly suggest.
Aj