Views [dbo].[UsableMaterialTypes]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created8:48:43 AM Thursday, December 5, 2024
Last Modified8:54:46 AM Thursday, December 5, 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