You are missing ... output in exec statement...
Declare @Count AS INT
Exec test 'S',@Count output
Select @Count
----- Original Message -----
From: "Usman Farhat" <Usman.[Email Address Removed] "LazyDBA.com Discussion" <[Email Address Removed] Monday, February 24, 2003 2:32 AM
Subject: Simple rowcount (urgent)
Hi guys can you please figure me out what i am missing out here , i wana get
@@rowcount value as output parameter but in my situation here output
parameter @Count returning me nothing . Its very simplest situation but
something i got to know which i am missing .
Drop proc TEST
GO
CREATE PROC TEST
@Initial AS varchar (64),
@Count INT Output
AS
SELECT
*
FROM
Sysobjects
WHERE Name LIKE @Initial + '%'
Set @Count = @@ROWCOUNT
GO
Declare @Count AS INT
Exec test 'S',@Count
Select @Count
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page