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)
 number of records

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-07-08 : 08:44:05
jayadev writes "can we number records and get it as a field"

macka
Posting Yak Master

162 Posts

Posted - 2002-07-08 : 09:24:25
Have a look at this :

[url]http://www.sqlteam.com/item.asp?ItemID=1491[/url]

macka.

Go to Top of Page

MakeYourDaddyProud

184 Posts

Posted - 2002-07-08 : 10:24:43
SELECT col1, col2, col3, (select count(*) from TABLEA) as 'RowTotal'
FROM TABLEA

Count of records will be in 4th cole rowtotal.

It's a bit of a kludge but will work. Better way to do is via Data Access object such as Recordset.RowCount or something similar.

HTH

Daniel Small MIAP
www.danielsmall.com IT Factoring
Go to Top of Page
   

- Advertisement -