![]() |
| ||
| Accesing tables rows in Stored procedure without using cursors From last two days i am searching for the answer of this querry. I want to know how can i access the rows of tables in stored procedures using loops(Without cursor). We don't want to use cursor for that because of the performance issues. |
| ||
| Re: Accesing tables rows in Stored procedure without using cursors Just to a while loop. declare @rowcount int, @counter int select @rowcount = (select count(*) from table_name) set @counter = 0 while @counter <= @rowcount begin select * from table_name where rowid = @counter set @counter = @counter + 1 end |
| ||
| Re: Accesing tables rows in Stored procedure without using cursors Quote:
MY REPLY: What was rowid here. It was giving invalid column name in SQL SERVER. PLZ reply soon. |
| ||
| Re: Accesing tables rows in Stored procedure without using cursors Quote:
your auto-incrementing id field |
| All times are GMT -4. The time now is 10:58 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC