How to 'exec sp_who' into #temp_table ?
--
Thanks !"SOHO" <hkwin2000@.hotmail.com> wrote in message
news:#RKHZjQcFHA.2128@.TK2MSFTNGP15.phx.gbl...
> How to 'exec sp_who' into #temp_table ?
>
> --
> Thanks !
>
>
CREATE TABLE #temp_table (
col1..
..
coln)
INSERT #temp_table
exec sp_who
Note the temp table's columns need to match the result set from the sp_who
sproc. Also, you might like sp_who2 better. It gives more information.
Rick Sawtell
MCT, MCSD, MCDBA|||See if this helps:
http://support.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.programming&mid=6954e8d3-69eb-49c0-ac86-cae4cc92cc86&sloc=en-us&sloc=en-us
AMB
"SOHO" wrote:
> How to 'exec sp_who' into #temp_table ?
>
> --
> Thanks !
>
>|||Thanks to all of you!!
Problems been solved.
--
Thanks !
"SOHO" <hkwin2000@.hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:%23RKHZjQcFHA.2128@.TK2MSFTNGP15.phx.gbl...
> How to 'exec sp_who' into #temp_table ?
>
> --
> Thanks !
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment