Posted by markjerz on 01/08/07 15:15
Hi,
Should be quite simple but can someone please tell me the best way to
count the number of rows in an UNION ALL statement.
I tried using @@ROWCOUNT but that doesn't seem to contain the correct
number.
Also, I assume that running the query again but just returning count(*)
instead of the data is horribly inefficient (plus the code is then
bloated.)?
Thanks,
Mark
[Back to original message]
|