there aren't arrays as such but there are workarounds
Code:
declare @myArray table (id int , myValue char(10))
declare @cnt int
set @cnt = 0
while @cnt < 10
begin
set @cnt = @cnt + 1
insert into @myArray
values(@cnt, cast(@cnt as char(10)))
end
select * from @myArray
As as side note, Microsoft has recanted the use of table variables over temp tables that will be used with larger record sets. I will post the link as soon as I am able to relocate it. In saying this, your solution may need to be re-evaluated.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.