Write an sql statement that uses the vpersonnames view


Problem

I. Write an index called idxHire on the HireDate field of HumanResources.Employee

II. Write a View called vPersonNames that returns the FirstName, MiddleName, LastName and FullName from Person.Person. Note: FullName must be created by combining the 3 other names together

III. Write an SQL statement that uses the vPersonNames view (do not include the actual output, as that would be waaaaay too much data)

IV. Write a View called vEmployee that returns the same 4 columns as above, but only for those people who are also current employees. Note: This will require a join...

V. Write a view called vTenYear that returns the same 4 colums as #4 for all employees who's HireDate is less than 10 years from the current date.

VI. Write a batch that uses a OldestHire variable to determine the oldest hire in HumanResources.Employee, then display the value of the variable.

VII. Write a stored procedure called spEmployee similar to #IV

VIII. Write an SQL statement that uses spEmployee (again, do not include the actual output)

IX. Write a stored procedure called spEmployeeByID where you pass an EmployeeID number to filter the output to only return the 4 columns for that one Employee.

X. Write an SQL statement that uses spEmployeeByID using 12 as the ID (again, no need for the output)

XI. Write another SP called spVerifedEmployeeByID that works similarly to #9 but displays the "Not a valid Employee ID" if there is no match. Note: This is not an error condition... just a null result set/

Request for Solution File

Ask an Expert for Answer!!
PL-SQL Programming: Write an sql statement that uses the vpersonnames view
Reference No:- TGS03262131

Expected delivery within 24 Hours