Question
Please use the ERD I have provided below, The tables i circled are the ones that you will have to use for this sql problem.
Please use the ERD I have provided below, The tables i circled are the ones that you will have to use for this sql problem.
1. Write the SQL to INSERT a new row into tblSTAFF_POSITION, using three nested "getid" stored procedures and one main stored procedure that executes the other three. Pass the following input values: the staff member's first and last name, the staff member's birthdate, the name of the position, the department the position is in, and a begin and end date. To fetch foreign keys in your nested "getid" stored procedures, use real values from tblSTAFF and tblPOSITION, and tblDEPARTMENT for the staff member's name and birthdate, the position, and the department. You can choose any begin and end date. No TRY and CATCH error-handling required, but use an explicit transactions in the main stored procedure. Write a SELECT statement to confirm that your INSERT worked.
tbISTAFE V StaffID StaffFName StaffLName StaffAddress Staff City StaffState StaffZip StaffBirth StaffNetID StaffEmail Gender tbISTAFF POSITION 9 StaffPositionID StaffID PositionID BeginDate EndDate DeptID tbIDAY DaylD Day Name DayDescr 9 tbISCHEDULE_DAY SchedulelD DayID XO tblPOSITION_TYPE 9 Position TypelD Position TypeName Position TypeDescr tblCOLLEGE CollegelD CollegeName CollegeDescr tbISCHEDULE SchedulelD ScheduleName SchedBegin Time SchedEndTime ScheduleDescr tblINSTRUCTOR_INSTRUCTOR_TYPE Instructorinstructor TypelD tblPOSITION PositionID PositionName -od InstructorID Instructor TypelD BeginDate EndDate Position TypelD Position Descr tbIDEPARTMENT DeptID DeptName DeptAbbrev CollegelD Dept Descri tblCOURSE CourselD CourseName Credits DeptID Course Descr CourseNumber tblINSTRUCTOR_TYPE InstructorTypeID Instructor TypeName Instructor TypeDescr TO tbIQUARTER Quarter D QuarterName QuartBeginMonth QuartEndMonth QuarterDescr P -00 od tblCLASS ClassID CourselD Quarter D YEAR P oooa ClassroomID SchedulelD. Section tbllr In In In 8 th 8
Step by Step Solution
3.44 Rating (163 Votes )
There are 3 Steps involved in it
Step: 1
Write the SQL to INSERT a new row into tblSTAFFPOSITION using three nested getid stored procedures a...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started