You have mixed up a couple of concepts.
Since you are still using SQL Server 2000, you'll have to do something like:
Code:
CREATE PROC whatevername
@count_rows INT
AS
declare @sql as varchar(8000)
set @sql = 'select MAX(q.eff_dt) AS TheDt from '
+ ' (select top ' + @count_rows + ' from dbo.tabla where cod = 99 order by src_eff_dt) AS q'
EXEC ( @sql )
print 'value=' + @sql