Unanswered: DBCC InputBuffer statement to be part of a select statement
I want to use DBCC inputbuffer function for all the spids in sysprocesses table without using a cursor or loop. In other words, I want to have the value of dbcc inputbuffer part of the select statement directly or indirectly. Is there a way??
Thank you Scooter. But this is not what I wanted to do. I want to capture the input buffer for a given spid. I can do it thro a cursor or loop but if my recordset is big then by the time it comes to execute the dbcc inputbuffer for the last spid the inputbuffer may have changed. That is the reason I wanted to try by some other way to narrow down the time difference.