Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sp_who order by dbname
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00777802
Message ID:
00777905
Views:
27
Thanks,

I found another way to sole my problem
-- crée une table temporaire
create table #users (
       spid int,
       ecid int,
       status char( 40),
       loginname char( 100),
       hostname char( 100),
       blk int,
       dbname char( 40),
       cmd varchar( 200)
       )

-- remplis la table avec le résultat de sp_who
     insert #users
      exec sp_who

--affiche le résultat trié par nom de DB
     select * from #users order by dbname

-- efface la table
     drop table #users
>Write your own. You can get the source for sp_who using this:
>
>use master
>execute sp_helptext 'sp_who'
>
>-Mike
>
>>Hi,
>>
>>By default, sp_who order result by spid. It can be filtered by active process or by user, but it can't be filtered or ordered by dbname (or loginname or hostname).
>>
>>Does anybody have a solution ?
>>
>>Thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform