Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mj
Starting Member
25 Posts |
Posted - 2001-08-28 : 09:57:56
|
| The code below is what I have so far with my sproc, the only problem is that the variable @Counter is not incrementing in the loop. Can anyone see an error with this, and if so, could you please point me in the right direction.Thanks,mjDeclare @counter intSet @Counter = 0--Declare @InsertDate varchar(25)While @Counter < 6Select DailyRate, Borrower, CusipNoFull, dateofrate from vVrdbDailyRates Where DateOfRate between dateadd(day,-@Counter, GetDate()) and GetDate()order by DateOfRate descSet @Counter = @Counter +1 |
|
|
|
|
|