Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2007
    Posts
    5

    Unanswered: How to convert sp_who in a table/query.

    Hi

    I would like to convert sp_who into a table/query. Please help

    Thanks

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I think you need to rethink and re-phrase your question.
    What you're asking does not make sense!

    You may wish to take a quick peek at the sysprocesses table.
    George
    Home | Blog

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Code:
    CREATE TABLE myTable99 (
    		  spid		int
    		, ecid		int
    		, status	varchar(50)
    		, loginame	varchar(255)
    		, hostname	varchar(255)
    		, blk		varchar(50)
    		, dbname	varchar(255)
    		, cmd		varchar(255)
    		)
    GO
    
    INSERT INTO myTable99 EXEC sp_who
    
    SELECT * FROM myTable99
    GO
    
    DROP TABLE myTable99
    GO
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I take it all back!
    I never knew you could run
    Code:
    INSERT INTO myTable99 EXEC sp_who
    I've made a note to take a more thorough look at this when I can
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •