EXECUTE with return value
Execute dbo.cuspRideSummaryUpdate to change the RideHours to 300 for '3/1/2018'. Store the return code from the stored procedure.
Cet exercice fait partie du cours
Writing Functions and Stored Procedures in SQL Server
Instructions
- Declare
@ReturnStatusas an integer and assign its value to the result ofdbo.cuspRideSummaryUpdate. - Execute the stored procedure, setting
@DateParmto'3/1/2018'and@RideHrsto300. - Select the
@ReturnStatusto see its value as well as the'3/1/2018'record fromRideSummaryto see the impact of the SP update.
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
-- Create @ReturnStatus
___ ___ AS int
-- Execute the SP, storing the result in @ReturnStatus
___ ___ = ___.___
-- Specify @DateParm
___ = '___',
-- Specify @RideHrs
___ = ___
-- Select the columns of interest
___
@ReturnStatus AS ReturnStatus,
Date,
RideHours
FROM ___.___
WHERE ___ = '3/1/2018';