Advertisement
Advertisement
| 05.03.2008 at 12:37PM PDT, ID: 23374167 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: |
declare @tab Table (i int identity, YearID int) declare @Rows int Declare @YearId int Insert into @tab Select yearid From headertab where yearid = 2009 SELECT @Rows = @@ROWCOUNT While @Rows > 0 Begin select @YearId=YearID from @tab where i=@Rows Set @Rows =@Rows - 1 end |