Viewing 2 posts - 1 through 2 (of 2 total)
-- What SQL Statements Are Currently Running?
SELECT [Spid] = session_Id
, ecid
, sp.blocked as 'Blocked By'
, [Database] = DB_NAME(sp.dbid)
, nt_domain
, [User] = nt_username
, sp.loginame
, sp.cmd as 'Command'
, [Status] = er.status
, [Wait]...
August 6, 2012 at 7:12 am
#1522022
Try using Pivot. Follow the link for example
http://msdn.microsoft.com/en-us/library/ms177410(v=sql.105).aspx
August 6, 2012 at 3:42 am
#1521915