clive-421796 (4/15/2010)
myProc should run in a loop while the date is between '2010-01-06' and '2010-01-25'.
if there is Date range then
below should work
CREATE PROCEDURE proc_student
@Start_Date datetime,
@end_date datetime
AS
Select * from Student
where Date between @Start_Date AND @end_date
GO
EXEC proc_student '2010-01-02', '2010-05-01'
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)