Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 sp_who2

Author  Topic 

mikica1972
Starting Member

1 Post

Posted - 2005-10-19 : 21:29:50
Hi all,

Is there any way to manipulate with results from sp_who2 ?

Something like:
select * from sp_who2 where hostname = 'computername'
or
exec sp_who2 into #temporaryTable

Thanks,
Stjepan

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-10-20 : 01:40:31
Create a table having same columns and Datatypes of what sp_who2 returns

Then use these queries

Insert into yourTable Exec sp_who2
select * from yourTable where hostname = 'computername'



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-10-20 : 02:16:47
you should check out sp_who3 on vyas' website:

http://vyaskn.tripod.com/sp_who3.htm



-ec
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-10-20 : 02:19:51
quote:
Originally posted by eyechart

you should check out sp_who3 on vyas' website:

http://vyaskn.tripod.com/sp_who3.htm



-ec


Thats good Article

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -