USE [Bimeh]
GO

/****** Object:  View [USR].[vwUsrUserList]    Script Date: 7/21/2020 12:23:33 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

ALTER VIEW [USR].[vwUsrUserList]
AS
SELECT        PUB.PubBusiness.BusinessName, PUB.PubPerson.FullName, EMP.EmpCompany.CompanyName, PUB.PubClientAccount.ClientAccountName, USR.UsrUser.UsrUserID, USR.UsrUser.UserTypeId, USR.UsrUser.Enabled, 
                         USR.UsrUser.Username, USR.UsrUser.SessionExpirationDuration, USR.UsrUser.LastUsed
FROM            USR.UsrUser LEFT OUTER JOIN
                         PUB.PubClientAccount ON USR.UsrUser.PubClientAccountId = PUB.PubClientAccount.PubClientAccountID LEFT OUTER JOIN
                         EMP.EmpCompany ON USR.UsrUser.EmpCompanyId = EMP.EmpCompany.EmpCompanyID LEFT OUTER JOIN
                         PUB.PubPerson ON USR.UsrUser.PubPersonId = PUB.PubPerson.PubPersonID LEFT OUTER JOIN
                         PUB.PubBusiness ON USR.UsrUser.PubBusinessId = PUB.PubBusiness.PubBusinessID
GO


