Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Using RETURN!!!

Author  Topic 

jesus4u
Posting Yak Master

204 Posts

Posted - 2002-08-05 : 11:57:27
Why is it in I try to return the total records in this table that it only works if I use the REUTURN word?

Thanks

 CREATE PROCEDURE dbo.db_CountUsers
@ReturnNumber int OUTPUT
AS

SELECT @ReturnNumber = Count(id) FROM Chatters
RETURN
GO


yakoo
Constraint Violating Yak Guru

312 Posts

Posted - 2002-08-05 : 12:10:09
are you calling the stored procedure correctly?

i.e.
declare @UserCount integer
exec db_CountUsers @UserCount OUTPUT
select @UserCount

Got SQL?
Go to Top of Page
   

- Advertisement -