How is an Employee ID like a Writing Desk?
by in CodeSOD on 2017-12-20Chris D’s has a problem. We can see a hint of the kind of problem he needs to deal with by looking at this code:
FUNCTION WHOIS (EMPLOYEE_ID IN VARCHAR2, Action_Date IN DATE)
RETURN varchar2
IS
Employee_Name varchar2(50);
BEGIN
SELECT employee_name INTO Employee_Name
FROM eyps_manager.tbemployee_history
WHERE ROWNUM=1 AND employee_id = EMPLOYEE_ID
AND effective_start_date <= Action_Date
AND (Action_Date < effective_end_date OR effective_end_date IS NULL);
RETURN (Employee_Name);
END WHOIS;