This works...
Drop proc TEST
GO
CREATE PROC TEST
@Initial AS varchar (64),
@Count INT Output
AS
SELECT
*
FROM
Sysobjects
WHERE Name LIKE @Initial + '%'
select @count = @@rowcount
GO
Declare @Count AS INT
set @count = 0
Exec test 'Au',@Count output
Select @Count
Thanks..
-----Original Message-----
From: Usman Farhat [mailto:Usman.[Email Address Removed] Monday, February 24, 2003 4:03 PM
To: LazyDBA.com Discussion
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