User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 426,394 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,272 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser: Programming Forums

Accesing tables rows in Stored procedure without using cursors

Join Date: Aug 2006
Posts: 2
Reputation: sarvesh jaiswar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sarvesh jaiswar sarvesh jaiswar is offline Offline
Newbie Poster

Re: Accesing tables rows in Stored procedure without using cursors

  #3  
Sep 4th, 2006
Originally Posted by itsdavetime View Post
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


MY REPLY:
What was rowid here. It was giving invalid column name in SQL SERVER. PLZ reply soon.
Reply With Quote  
All times are GMT -4. The time now is 1:14 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC