Views [dbo].[UsableMaterialTypes]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created9:00:58 AM Friday, November 22, 2024
Last Modified9:05:59 AM Friday, November 22, 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