[EMAIL PROTECTED] <> wrote: > Got a stored procedure that returns a record set just fine. There > are times however that I just want the count. Rather than creating > the SQL logic again, substituting the fields desired with the > COUNT(*) instead, is there an easier way to simply say something like > "give me the @@rowcount of the spMyProcThatGetsRows"
I'd just make a copy of that SP, to a new one and change your field list to just be count(*). Can you execute a scalar function and just receive back the count instead of a cursor? If so that is what your doing in this case. Having many SPs that do the work for you is a blessing, curse mind you. Stephen Russell DBA / Operations Developer Memphis TN 38115 901.246-0159 http://spaces.msn.com/members/srussell/ -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 7/24/2006 _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

