Due to the way EXEC works, you won't get a @@rowcount back from it. You
might be able to get sp_executesql to work, but I haven't tried it.
HTH,
Darin Strait, MS SQL Server Development and Administration
http://home.earthlink.net/~dstrait/professional/resume.htm
----- Original Message -----
From: "Ninh" <ninhht@y...>
To: "sql language" <sql_language@p...>
Sent: Monday, April 23, 2001 10:36 AM
Subject: [sql_language] StoredProc No Record returned
> I used a exec(string) in a sproc such as:
> create proc ABC
> @tableName varchar(40)
> as
> declare @strSQL varchar(100)
> select @strSQL = 'select *from '+@tablename
> exec(@strSQL )
>
> I provided right parameter but the proc didn't return any record
> Thank for your time with me