1. Learn
  2. /
  3. Courses
  4. /
  5. Writing Functions and Stored Procedures in SQL Server

Connected

Exercise

Execute scalar with select

Previously, you created a scalar function named SumRideHrsDateRange(). Execute that function for the '3/1/2018' through '3/10/2018' date range by passing local date variables.

Instructions

100 XP
  • Create @BeginDate and @EndDate variables of type date with values '3/1/2018' and '3/10/2018'.
  • Execute the SumRideHrsDateRange() function by passing @BeginDate and @EndDate variables.
  • Include @BeginDate and @EndDate variables in your SELECT statement with the function result.