What I need to do is get the exact output that is right below. By creating a pro
ID: 3832744 • Letter: W
Question
What I need to do is get the exact output that is right below. By creating a procedure that will take print_type as an input to fufill the request. Needs to be in Microsoft Sql Server 2012. Not Oracle.
Print Job ID Print Temm Stu Tech ID PrintID Print Count Total Print Amount Print Date PrintID Print Type Print Side Print Ul Spring 2017 34567890 3 2017-01-10 3 Color 1.25 Single 0.25 Fall 2016 12345678 2016-11-10 3 Color 10 2.50 Single 0.25 The department wants to find out all the color print jobs made in the last 4 months. create a procedure that will take the print type as input to fulfill the request. HINT: Use table PrintTransactions and PrintsExplanation / Answer
Create procedure prints_info (@print_type varchar)
As
Begin
Select Print_Job_Id,Print_Term,Stu_Tech_Id,Print_Id,Print_Count,Total_Print_Amount,Print_Date,Print_Id,Print_Type,Print_Side,Print_Unit_Cost from PRINTTRANSACTIONS t,PRINTS p where t.Print_Id=p.Print_Id and Print_Date >= DATEADD(m,-4,current_timestamp) and p.Print_Type=@print_type
End
The above is the procedure which prints the output as the table given with the prints information from the last 4 months
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.