Question: Proc SAS code is needed. Using a Noncorrelated Subquery Each month a memo is that lists the employees who have employment anniversaries for that month

Proc SAS code is needed.

  1. Using a Noncorrelated Subquery

Each month a memo is that lists the employees who have employment anniversaries for that month is posted. Create the report for the current month and list Employee_ID and the first and last names for all employees hired during the current month of any year.

You can find Employee_Name in the orion.employee_addresses table and Employee_Hire_Date in the orion.employee_payroll table. Both tables contain the column Employee_ID. Order the report by an employee's last name.

    1. Create a query that returns a list of employee IDs for employees with a current anniversary. The query should do the following:
  • Display Employee_ID numbers.
  • Use the orion.employee_payroll table.
  • Return only employees whose hire date (Employee_Hire_Date) is in the current month.
  • Add a title to the report as shown.

Partial PROC SQL Output (Generated when current month = February)

    1. Using the query in 1.a. as a noncorrelated subquery, write a query that displays the employee IDs and names of employees who have current month anniversaries. The final query should do the following:
  • Display Employee_ID and split Employee_Name into two new columns: FirstName and LastName. Both new columns should have a length of $15 and appropriate labels. (See the report below.) The original Employee_Name is stored as Lastname, Firstname.
  • Use the orion.employee_addresses table.
  • Select Employee_ID only for employees who had current month anniversaries.
  • Order the final results by LastName.
  • Create an appropriate title.

Partial PROC SQL Output (Generated when current month = February)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!