Views [dbo].[UsableMaterialTypes]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created9:13:36 AM Friday, November 8, 2024
Last Modified9:19:45 AM Friday, November 8, 2024
Columns
Name
MaterialTypeFID
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script

/*
* Materials aren't fully configured unless they have mappings for all 3 categories
* (containers, packing and unpacking)
* This ensures that they're fully specified.
*/

CREATE VIEW [dbo].[UsableMaterialTypes]
    AS
        select
            MaterialItemCodeMap.MaterialTypeFID
        from MaterialItemCodeMap
        group by MaterialItemCodeMap.MaterialTypeFID
        having count(*) = 3
GO
GRANT SELECT ON  [dbo].[UsableMaterialTypes] TO [MssExec]
GRANT INSERT ON  [dbo].[UsableMaterialTypes] TO [MssExec]
GRANT DELETE ON  [dbo].[UsableMaterialTypes] TO [MssExec]
GRANT UPDATE ON  [dbo].[UsableMaterialTypes] TO [MssExec]
GO
Uses