Create table #temp_user (group_id int)
insert #temp_user Exec sp_user_acct XXXX,XX,X
It is working but not a good performance. How can I change it with something below? (CTE)
Create table #temp_user (group_id int)
;with My_CTE as (select * from #temp_user)
insert into My_CTE Exec sp_user_acct XXXX,XX,X
Select * from My_CTE
-- it looks like it does the insert but after that:invalid object name my_cte.