Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to insert sp_who value into a table?

Status
Not open for further replies.

kmsam2

Programmer
May 21, 2003
29
MY
any idea how to insert sp_who value into a table?

Sam.
 
Yup... if table structure matches response:
Code:
create table #blah
(	spid smallint,
	ecid smallint,
	status nchar(30),
	loginame nchar(128),
	hostname nchar(128),
	blk char(5),
	dbname nchar(128),
	cmd nchar(16)
)

[b]insert into #blah exec sp_who[/b]
select * from #blah
drop table #blah
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top