Author Topic: Any tips & trix how to get an report of users i ms-SQL repository  (Read 2534 times)

steen.jensen

  • EA User
  • **
  • Posts: 181
  • Karma: +8/-1
    • View Profile
Halloy.
We have about 65 users i ouer ms-SQL repository in 15 diffrent user groups.
Is there any doc-template or SQL-script that can list users och groups för possible export to excel & document printout

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Any tips & trix how to get an report of users i ms-SQL repository
« Reply #1 on: April 14, 2023, 08:48:34 pm »
Query t_secuser and t_secgroup. That should get you the reasonable information.

q.

rupertkiwi

  • EA User
  • **
  • Posts: 133
  • Karma: +5/-0
    • View Profile
Re: Any tips & trix how to get an report of users i ms-SQL repository
« Reply #2 on: April 17, 2023, 02:40:34 pm »
this might help :

select d.groupname AS Groupname,a.firstname + ' ' + a.surname AS Name
from t_secuser a
inner join t_secusergroup b on a.userid=b.userid
 inner join t_secgroup d on b.groupid=d.groupid
 order by 1,2

steen.jensen

  • EA User
  • **
  • Posts: 181
  • Karma: +8/-1
    • View Profile
Re: Any tips & trix how to get an report of users i ms-SQL repository
« Reply #3 on: April 18, 2023, 07:46:21 am »
this might help :

select d.groupname AS Groupname,a.firstname + ' ' + a.surname AS Name
from t_secuser a
inner join t_secusergroup b on a.userid=b.userid
 inner join t_secgroup d on b.groupid=d.groupid
 order by 1,2

Thanks  8)