Hi
I am getting error - Must declare the table variable "@TableName"
CREATE PROCEDURE MaxDocEntry -- Add the parameters for the stored procedure here @TableName VARCHAR(50) = NULL ,@DocEntry INT OUTPUT AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; SELECT @DocEntry = MAX(docentry) FROM @TableName END GO