>CREATE PROCEDURE get_count >(@tcTable varchar(30) >,@tcColumn varchar(30) >,@tnValue integer > >AS > >CREATE TABLE #getcount >(countis int) > >EXEC ( >'DELCARE @nCount integer >SELECT @nCount = count(*) FROM '+@cTable+' WHERE '+@tcColumn+' = '+@tnValue >'INSERT #getcount (countis) VALUES (@nCount)' >) > >declare @nCount integer > >select @nCount = countis from #getcount > >RETURN @nCount >GO >>