<p>I need to get all the dates present in the date range using SQL Server 2005</p>

If you have the dates in a table and simply want to select those between two dates you can use
```
```
select * from yourTable where yourDate between date1 and date2
```
```
If you want to produce the dates from nothing you could do it with a loop or you could populate a temporary table with dates and then select from that.