Why not a WHERE clause? Sounds like you're getting the records one at a time?
Exactly i want to get all the data's. That'y i use loop through.
Here in table my StartDate can be From and To date is one and the same. For ex, if i run the script today, My From and To Date [table columns] can be today. If i run my Script tomorrow my From and To Date [table columns] can be tomorrow.
Exactly my script is like this.
DECLARE @StartDate DATETIME,@LEndDate DATETIME,@EndDate DATETIME
@StartDate = '2010-10-02'
@LEndDate = '2010-10-05'
WHILE @StartDate <= @LEndDate
SET @StartDate = @StartDate
SET @EndDate = @StartDate
<SELECT Statement WHERE FromDate = @StartDate AND ToDate = @EndDate>
SET @StartDate = @StartDate + 1