2017-12-05 14 views

답변

1

당신은 데이터베이스에 대한 SQL 쿼리와 함께이 작업을 수행 할 수 있습니다

SELECT cu.lower_user_name 
     ,cu.display_name 
     ,cu.lower_display_name 
     ,cu.lower_email_address 
     ,cu.is_active 
     ,dateadd(second,cast(cast(cua.attribute_value AS nvarchar(255)) AS bigint)/1000,'19700101 00:00:00:000') AS LAST_LOGIN 
    FROM [BitBucketDB].[dbo].[cwd_user] As cu 
     LEFT JOIN [BitBucketDB].[dbo].cwd_membership AS cm 
     ON cu.directory_id=cm.directory_id 
     AND cu.lower_user_name=cm.lower_child_name 
     AND cm.membership_type='GROUP_USER' 

     LEFT JOIN [BitBucketDB].[dbo].cwd_user_attribute As cua 
     ON cu.ID = cua.user_id and cua.attribute_name='lastAuthenticationTimestamp' 
     WHERE cm.lower_parent_name='stash-users' 
+0

덕분에 많이. 필요에 따라 일했습니다. –