How do I accumulate values in T-SQL? AFAIK there is no ARRAY type. I want to re-use the values in the same query like demonstrated in this PostgreSQL example using array
Not sure if this helps, but you can always...
select * into #MyTempTable from SomeTable