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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 count related question

Author  Topic 

pchari
Starting Member

4 Posts

Posted - 2002-03-04 : 15:48:24
Hi All,
Fairly new to SQL Server
I have a table and have to update it's column row by row. Is there a function like count() to find the row number or so?
Please...
Thanks.


yakoo
Constraint Violating Yak Guru

312 Posts

Posted - 2002-03-04 : 15:54:46
From a previous post by Jay99

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q186133&SD=MSKB&

Go to Top of Page

pchari
Starting Member

4 Posts

Posted - 2002-03-04 : 16:00:31
Thanks. That helps.


Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2002-03-04 : 20:19:14
Maybe I totally misunderstood your question, but I had the impression when you said you were updating data that you were looking for a rownumber you could use in an update statement that said somethine like WHERE ROWNUMBER = X. If that was the case, then you need to know that there is no such rownumber in SQL Server.

The article linked by yakoo will work for a SELECT statement results. Alternatively if you are trying to assign a sequential number into a field (column) of your table, you might want to look at Graz's article on Sequential Record Numbers.

------------------------
GENERAL-ly speaking...
Go to Top of Page
   

- Advertisement -