/*
For Testing script
declare @x table (cod varchar(100))
insert into @x (cod) select 'AAAAAAAA'
declare @i int
set @i = 0
while @i<1000
begin
insert into @x (cod) select top 1 dbo.fn_Calc_AlfaSeq(cod) from @x order by cod desc
set @i=@i+1
end
select * from @x
*/