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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sp_who results

Status
Not open for further replies.

AWEinCA

Programmer
Oct 18, 2000
35
US
Would someone be willing to share the syntax of how to put the sp_who result set into a temp table?

I am a newbe with t-sql:)

Any help would be appreciated,
Aaron

[sig][/sig]
 
What will you be using as the client? Query Analyzer? ODBC application? [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
create table #sp_who_table
(
spid smallint NULL,
status nchar(30) NULL,
loginame nchar(128) NULL,
hostname nchar(128) NULL,
blk char(5) NULL,
dbname nchar(128) NULL,
cmd nchar(16) NULL
)

insert #sp_who_table
EXEC master..sp_who

-- test it
select *
from #sp_who_table [sig][/sig]
 
Thanks...

FoxDev, I will be using an ODBC client that will trigger a stored procedure (I hope anyway:).

TomSark, Thanks! You are a live saver. I have been surfing the web for a couple of days trying to figure it out. I just tested it and it worked.
[sig][/sig]
 
Any time...

tdavis@sark.com is my e-mail address...

Tom [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top