I have an requirement of inserting the output of "DBCC inputbuffer "
into a table variable..
I tried with the following query,
DECLARE @T3 TABLE
(
A SYSNAME,
B SYSNAME,
[INPUT_BUFFER] NVARCHAR(1200),[SPID] INT NULL
);
INSERT @T3(A,B,[INPUT_BUFFER])
EXEC SP_EXECUTESQL ('DBCC INPUTBUFFER(55)WITH NO_INFOMSGS')
But the sql server prompts me that
"Server: Msg 197, Level 15, State 1, Line 12
EXECUTE cannot be used as a source when inserting into a table variable."
I can accomplish the same using #tables (temporary tables ).
Can any one suggest a way to accomplish the same using tables variables..
Regards,
Paarthasarathy K, Chennai
(Life is Full of Compilation Errors and Unhandled Exceptions )
Kindest Regards,
Paarthasarathy
Microsoft Certified Technology Specialist
http://paarthasarathyk.blogspot.com