Views [dbo].[UsableMaterialTypes]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created7:32:19 PM Tuesday, September 24, 2024
Last Modified7:37:29 PM Tuesday, September 24, 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