Output parameters are received after all recordsets are closed in a stored procedure. You could just the same do this:
SELECT * FROM TABLE SET @myOutput = @@ROWCOUNT Is there a reason that GetRows() won't help you in this? (for the recordcount & the data itself)? David L. Penton, Microsoft MVP JCPenney Application Specialist / Lead "Mathematics is music for the mind, and Music is Mathematics for the Soul. - J.S. Bach" [EMAIL PROTECTED] Do you have the VBScript Docs or SQL BOL installed? If not, why not? VBScript Docs: http://www.davidpenton.com/vbscript SQL BOL: http://www.davidpenton.com/sqlbol -----Original Message----- From: Chris Tifer [mailto:[EMAIL PROTECTED]] If I was using a stored procedure, I would probably just set up an output parameter with the count. SET NOCOUNT ON SELECT @myOutputVar = COUNT(*) FROM TABLE SELECT * FROM TABLE SET NOCOUNT OFF Unless there's a specific need for EACH row to also return the total in the table, but for the life of me I can't come up with a reason. Chris Tifer ----- Original Message ----- From: "Steve Abaffy" <[EMAIL PROTECTED]> > Hello, > > How do I write a query that will return all the rows in a table with the > addition of the count of those rows? > Something like > > Select Count(*),* From table > > Thanks in Advandce --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
