I have a stored procedure and when I try and run it it return no results.
this is a sample of a data in the date column:
2012-05-19 07:35:00
when I test it what do I need to put in the following:
execute GetAttendTotalsByDay 3, '05-19-2012' -- ???
Also I'm calling this from ASP.NET 4.0 VB code WEB page.
So I would just like to pass the date to the procedure in a format like dd-mm-yyyy
and have the stored procedure interrogate that and then return values.
DougP
this is a sample of a data in the date column:
2012-05-19 07:35:00
when I test it what do I need to put in the following:
execute GetAttendTotalsByDay 3, '05-19-2012' -- ???
Also I'm calling this from ASP.NET 4.0 VB code WEB page.
So I would just like to pass the date to the procedure in a format like dd-mm-yyyy
and have the stored procedure interrogate that and then return values.
Code:
Create Procedure GetAttendTotalsByDay
(
@grade nvarchar(1),
@Date as smalldatetime
)
AS
Declare @TotalTardy int
set @TotalTardy = (Select Count(Present) as TotalTardy
from Present
where grade = @grade and [Present] = 'T' and AttendDate = @Date)
Select @TotalTardy
return
DougP