Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sp_who order by dbname
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00777802
Message ID:
00777905
Vues:
26
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform