Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Lobo Mau,
For Testing script
declare @x table (cod varchar(100))
insert into @x (cod) select 'AAAAAAAA'
declare @i int
set @i = 0
insert into @x (cod) select top 1 dbo.fn_Calc_AlfaSeq(cod) from @x order by cod desc
select * from @x
Select particular table