By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,266 Members | 1,297 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,266 IT Pros & Developers. It's quick & easy.

rowcount help

P: n/a
i'm trying to get total rows found by query that uses top clause...

for example:
select top 10 myTable.* from myTable where myTable.number > 200
let's say there are 13 rows matching that condition, and by using
@@rowcount my result would be: 10.
is there any way to get total row count, without affecting the TOP
clause??? i believe that the mysql equivalent would be
SQL_CALC_FOUND_ROWS().
tnx...

May 20 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I answered this question in microsoft.public.sqlserver.server.

It's bad etiquette to post the same question independently to multiple
groups because that causes unnecessary duplication of effort by persons
trying to help. If you have a question appropriate for multiple groups,
specify all groups in a single post so that all responses appear in all
groups.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"D.B." <de***********@gmail.com> wrote in message
news:11*********************@i39g2000cwa.googlegro ups.com...
i'm trying to get total rows found by query that uses top clause...

for example:
select top 10 myTable.* from myTable where myTable.number > 200
let's say there are 13 rows matching that condition, and by using
@@rowcount my result would be: 10.
is there any way to get total row count, without affecting the TOP
clause??? i believe that the mysql equivalent would be
SQL_CALC_FOUND_ROWS().
tnx...

May 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.