Automic Workload Automation

 View Only
  • 1.  SQL Query

    Posted Nov 07, 2019 05:59 PM
    ​Does someone have a MS SQL query to extract a list of users, the Automic group assigned to each of the user for a specific client or group by clients?


  • 2.  RE: SQL Query
    Best Answer

    Posted Nov 07, 2019 06:47 PM
    Edited by Diane Craddock Nov 19, 2019 10:20 AM
    select oh2.oh_name as 'GROUP'
         , oh2.oh_client as 'CLIENT'
         , replace(oh1.oh_name,'/SAIF','') as 'USER'     
    	 , case USR_Active	 
    	      when 0 then 'DEACTIVATED'
    	      else ' '
    	   end as STATE
    	 , USR_LastSession as LAST_USED
    from   oh as oh1
          ,oh as oh2
    	  ,usr
    	  ,usrg
    	  ,USG 
    where oh1.oh_idnr=USR_OH_Idnr
    and   USRG_USR_Idnr=USR_OH_Idnr 
    and   usrg_usg_idnr = usg_oh_idnr
    and   USG_OH_Idnr=oh2.oh_idnr 
    order by 1, 2, 3


    ------------------------------
    Pete
    ------------------------------



  • 3.  RE: SQL Query

    Posted Nov 07, 2019 11:59 PM
    ​Thank you Pete!