Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to show 'No Records Found' and 'Employee Name Unknown' in oracle report

798631Sep 20 2010 — edited Sep 20 2010
Hello,
I'm using 6i and building a report to show employees who have incorrectly input their time. I have an input parameter so a user can select a specific employee by emp_id or can leave it empty to show all. That part works. I also have date parameters that are required. That works too. However I am having trouble displaying 'NO Records Found' if the date parameters have no late or rejected employee time records. I currently have it as a text field arranged behind the emp_name field which i filled white. It works...however i have a pretty good feeling there is a better way to do this. Also, I have some data that is null since i am using two tables. There are time stamps with no emp_name or emp_number. I still need to show these records but want them to show up as "Employee Name Unknown" that way the user doesnt get confused and thinks the emp_name in the row above also includes this row.

select e.location "Clock Location",
e.emp_no "Emp No",
l.first_name ||' ' || last_name "Name",
e.time_stamp "Time",
from emp_time e, master_all l
where e.emp_no (+) = l.emp_no
and e.status = 'rejected'
--and e.emp_no = nvl (:p_emp_no, emp_no)
--and e.time_stamp between :p_start_date and :p_end_date
This post has been answered by Frank Kulash on Sep 20 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 18 2010
Added on Sep 20 2010
4 comments
1,474 views