I have this code which has to be written in SQL Server stored Proc . Basically stored proc accepts
StartDate and EndDate and Calcuates the days and loops thru the end of the date and runs the select statement .
S = DateDiff("d", varStartDate, varEndDate - 1)
If s > 0 Then
For i = 1 To s
Select * from tblBank where bankID = 1 and date = dateAdd("d",s,varstartdate)
and bankID = varbankID