Sunday, February 26, 2012

Fast counting of records

I seem to remember reading many moons ago about a function where you
can retrieve a count of the last recordset you opened.

For example:

I've got a stored procedure that returns a recordset using the TOP 10
so I only get the top 10 records. I need to know the recordcount but I
dont want to reuse the SELECT statement because its quite complex.

Any ideas?

What does @.@.Count do?

Thanks in advance"Samuel Hon" <noreply@.samuelhon.co.uk> wrote in message
news:c8672b7d.0309110815.2fba8c32@.posting.google.c om...
> I seem to remember reading many moons ago about a function where you
> can retrieve a count of the last recordset you opened.
> For example:
> I've got a stored procedure that returns a recordset using the TOP 10
> so I only get the top 10 records. I need to know the recordcount but I
> dont want to reuse the SELECT statement because its quite complex.
> Any ideas?
> What does @.@.Count do?
> Thanks in advance

@.@.ROWCOUNT

Simon

No comments:

Post a Comment