Guest_imported
New member
- Jan 1, 1970
- 0
This is probably obvious to everyone except me...
My telephone directory is a single table. The search query is as follows:
select LAST_NAME, TEL_NUM, DEPT, SECTION
from ALL_R
where ((upper(LAST_NAME) LIKE upperLast_Name)||'%')
AND ((upper(DEPT) like '%'||upperkeyword)||'%')
OR (upper(SECTION) like '%'||upperkeyword)||'%')
AND(TEL_NUM LIKE '%'||Tel_Num)||'%'))
order by LAST_NAME ASC
This works fine for seaches on name, keyword or number in that it returns all the people required. What my query doesn't do is return rows which have the name missing e.g. dept fax numbers. However I change it I have problems - HELP PLEASE.
Badger, UK
My telephone directory is a single table. The search query is as follows:
select LAST_NAME, TEL_NUM, DEPT, SECTION
from ALL_R
where ((upper(LAST_NAME) LIKE upperLast_Name)||'%')
AND ((upper(DEPT) like '%'||upperkeyword)||'%')
OR (upper(SECTION) like '%'||upperkeyword)||'%')
AND(TEL_NUM LIKE '%'||Tel_Num)||'%'))
order by LAST_NAME ASC
This works fine for seaches on name, keyword or number in that it returns all the people required. What my query doesn't do is return rows which have the name missing e.g. dept fax numbers. However I change it I have problems - HELP PLEASE.
Badger, UK