Welcome! Log In Create A New Profile

Advanced

Assignment 2

Posted by basicgerm 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar Assignment 2
December 23, 2010 04:21PM
We rock it in here!
Re: Assignment 2
March 29, 2011 02:17AM
Okay Basicgerm
I need help... have to admit it!!
The question (Assign2 Q2) :
The human Resources department needs to find the names and hire dates for all employees who were hired before 29 January 2000, along with their managers’ names. Sample results are shown in the table below.

The answer is suposed to be a sub query (not a join)........ I just cannot get a sub query that will give me the managers name at the same time I get the employee's name.
Re: Assignment 2
March 30, 2011 03:02PM
Put the manager name in a subquery in the column list:
select e.last_name, e.hire_date, (SELECT m.last_name from employees m where m.employee_id = e.manager_id ) as "Manager Name"......
Sorry, only registered users may post in this forum.

Click here to login