Ajay Mavatkar

Ajay Mavatkar

  • NA
  • 68
  • 12.6k

Insert result set of sp into a temp table

Jul 27 2017 2:32 AM
Hi,
 
I need to insert result set of SP into a  temp table, however it is giving the following error.
 
'The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction'
 
Please find my effort regarding this.
 
DECLARE @tempTable TABLE(ID INT, [Description] NVARCHAR(50));
INSERT @tempTable EXEC sp_MyTable] 100
select * from @tempTable
 
Any help would be apprciated. 
 

Answers (4)