USING SQL SERVER DEVELOPER 2012
Create a stored procedure using the STUDENT database called ap_CalcGrade that does the following:
Accepts as input STUDENT_ID, SECTION_ID, GRADE_TYPE_CODE, and GRADE_CODE_OCCURRENCE
Outputs the numeric grade and the letter grade back to the user
If the numeric grade is found, return 0, otherwise return 1
You muse use a cursor to loop through the GRADE_CONVERSION table to find the letter grade
You can use the following code to test your procedure:
-- *** Test Program ***
Declare @LetterVal varchar(2), -- Letter Grade
@Numeric int, -- Numeric Grade
@Result int -- Procedure Status (0 = OK)
Execute @Result = dbo.ap_CalcGrade 102, 86, 'QZ', 3,
@Numeric output, @LetterVal output
If @Result = 0
SELECT @LetterVal grade, @Numeric number
Else
SELECT 'No Find'
Execute @Result = dbo.ap_CalcGrade 100, 155, 'PA', 5,
@Numeric output, @LetterVal output
If @Result = 0
SELECT @LetterVal grade, @Numeric number
Else
SELECT 'No Find'
Execute @Result = dbo.ap_CalcGrade 105, 155, 'PA', 5,
@Numeric output, @LetterVal output
If @Result = 0
SELECT @LetterVal grade, @Numeric number
Else
SELECT 'No Find'
The output should be:
A+ 97
No Find
C- 72
Submit the .SQL file containing your procedure and the test code.
I have read the description provided with the project, I have full command over all development tools and enough experience to get the job done. I am willing to serve you with my best skills i assure you will like my work. Want to discuss further message me please.
Best Regards.