Views [dbo].[CommissionableSalespeople]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created9:11:13 AM Friday, December 7, 2018
Last Modified7:41:20 PM Wednesday, February 28, 2024
Columns
Name
SysUserLaborTypeMapID
FullName
LaborType
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE VIEW [dbo].[CommissionableSalespeople]
    AS
select
    SysUserLaborTypeMap.SysUserLaborTypeMapID as SysUserLaborTypeMapID,
    dbo.FormatLastNameFirstName( SysUser.LASTNAME, SysUser.FIRSTNAME ) as FullName,
    case
        when LaborType.LaborType = 'Coor' then 'Coordinator'
        else LaborType.LaborType
    end as LaborType
from Sysuser
inner join LaborType on LaborType.IsSalesTeamType = 1
inner join SysUserLaborTypeMap on
    SysUserLaborTypeMap.SysUserFID = Sysuser.SysUserID and
    SysUserLaborTypeMap.LaborTypeFID = LaborType.PriKey
inner join Status on Status.PriKey = Sysuser.Status
where
    Status.Status != 'INACTIVE' and
    SysUserLaborTypeMap.VendorID is not null
GO
GRANT SELECT ON  [dbo].[CommissionableSalespeople] TO [MssExec]
GRANT INSERT ON  [dbo].[CommissionableSalespeople] TO [MssExec]
GRANT DELETE ON  [dbo].[CommissionableSalespeople] TO [MssExec]
GRANT UPDATE ON  [dbo].[CommissionableSalespeople] TO [MssExec]
GO
Uses