Wednesday, July 2, 2014

get number of records from database with recorddate less than current date in sql

 SELECT COUNT(*)
FROM  SessionSchedule
WHERE (ID = @sessionScheduleId) AND (fromDate <= GETDATE())

No comments:

Post a Comment