Code:
ALTER PROCEDURE GetBookings
(
@CurrentDate datetime,
@Catergory char(10)
)
AS
SELECT BookingId, StartDate, PeriodStart, Catergory, Staff, Resource,
Class, @CurrentDate AS Expr1
FROM tblBookings
WHERE StartDate <= @CurrentDate and EndDate >= @CurrentDate and
Catergory=@Cate rgory
Code:
ALTER PROCEDURE GetBookings
(
@StartDate datetime,
@EndDate datetime,
@Catergory smallint
)
AS
SELECT *
FROM tblBookings
WHERE StartDate >= @StartDate and EndDate <= @EndDate and
Catergory=@Cate rgory
_______________ _______________ _______________ _____________
What the difference between the to stored procedures in terms what the
date filters return??
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Comment