Thanks for the procedure.
My basic need is that the Report , has to automatically get updated with different rows every 10 seconds.
Say suppose , I have set my Report to Auto-Refresh option every 10 seconds. In that case, will this stored procedure return a value exactly incremented by 1 each time , the auto-refresh happens . That is ...
1st time , this procedure is invoked from the Report via Auto-Refresh it should return 1
2nd time the same procedure is invoked from the Report via Auto-Refresh, it should return 2
3rd time the same procedure is invoked from the Report via Auto-Refresh, it should return 3
4th time the same procedure is invoked from the Report via Auto-Refresh, it should return 4
Finally the 5th time ,the same procedure is invoked from the Report via Auto-Refresh , it should return 1
So across each postback from the Report , is there a mechanism which will make the SQL Server remember the value it returned from the stored procedure , the previous time , so that it can get incremented by 1 , on every new call.