Tables [dbo].[MilitaryAllocationItemCode]
Properties
PropertyValue
Row Count (~)0
Created10:30:21 AM Monday, March 30, 2015
Last Modified10:30:29 AM Monday, March 30, 2015
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_MilitaryAllocationItemCode: MilitaryAllocationItemCodeIDMilitaryAllocationItemCodeIDint4
No
1 - 1
Foreign Keys FK_MilitaryAllocationItemCode_MilitaryAllocationHeader: [dbo].[MilitaryAllocationHeader].MilitaryAllocationHeaderFIDMilitaryAllocationHeaderFIDint4
No
Foreign Keys FK_MilitaryAllocationItemCode_ItemCode: [dbo].[ItemCode].ItemCodeFIDItemCodeFIDint4
No
Percentagefloat8
No
MinimumPaymentmoney8
Yes
EffectiveStartdatetime8
Yes
EffectiveEnddatetime8
Yes
Foreign Keys FK_MilitaryAllocationItemCode_PreferredRevenueAgent: [dbo].[PreferredRevenueAgent].PayAgentFIDPayAgentFIDint4
No
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_MilitaryAllocationItemCode: MilitaryAllocationItemCodeIDPK_MilitaryAllocationItemCodeMilitaryAllocationItemCodeID
Yes
Check Constraints Check Constraints
NameConstraint
CK_MilitaryAllocationItemCode_ValidEffectiveDates(isnull([EffectiveStart],(0))<isnull([EffectiveEnd],(100000)) AND (1)=[dbo].[MilitaryAllocationItemCodeEffectiveDates]([MilitaryAllocationHeaderFID],[ItemCodeFID],[EffectiveStart],[EffectiveEnd]))
Foreign Keys Foreign Keys
NameDeleteColumns
FK_MilitaryAllocationItemCode_ItemCodeItemCodeFID->[dbo].[ItemCode].[ICPriKey]
FK_MilitaryAllocationItemCode_MilitaryAllocationHeaderCascadeMilitaryAllocationHeaderFID->[dbo].[MilitaryAllocationHeader].[MilitaryAllocationHeaderID]
FK_MilitaryAllocationItemCode_PreferredRevenueAgentPayAgentFID->[dbo].[PreferredRevenueAgent].[PreferredRevenueAgentID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[MilitaryAllocationItemCode]
(
[MilitaryAllocationItemCodeID] [int] NOT NULL IDENTITY(1, 1),
[MilitaryAllocationHeaderFID] [int] NOT NULL,
[ItemCodeFID] [int] NOT NULL,
[Percentage] [float] NOT NULL,
[MinimumPayment] [money] NULL,
[EffectiveStart] [datetime] NULL,
[EffectiveEnd] [datetime] NULL,
[PayAgentFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationItemCode] ADD CONSTRAINT [CK_MilitaryAllocationItemCode_ValidEffectiveDates] CHECK ((isnull([EffectiveStart],(0))<isnull([EffectiveEnd],(100000)) AND (1)=[dbo].[MilitaryAllocationItemCodeEffectiveDates]([MilitaryAllocationHeaderFID],[ItemCodeFID],[EffectiveStart],[EffectiveEnd])))
GO
ALTER TABLE [dbo].[MilitaryAllocationItemCode] ADD CONSTRAINT [PK_MilitaryAllocationItemCode] PRIMARY KEY CLUSTERED  ([MilitaryAllocationItemCodeID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryAllocationItemCode] ADD CONSTRAINT [FK_MilitaryAllocationItemCode_ItemCode] FOREIGN KEY ([ItemCodeFID]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[MilitaryAllocationItemCode] ADD CONSTRAINT [FK_MilitaryAllocationItemCode_MilitaryAllocationHeader] FOREIGN KEY ([MilitaryAllocationHeaderFID]) REFERENCES [dbo].[MilitaryAllocationHeader] ([MilitaryAllocationHeaderID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[MilitaryAllocationItemCode] ADD CONSTRAINT [FK_MilitaryAllocationItemCode_PreferredRevenueAgent] FOREIGN KEY ([PayAgentFID]) REFERENCES [dbo].[PreferredRevenueAgent] ([PreferredRevenueAgentID])
GO
GRANT SELECT ON  [dbo].[MilitaryAllocationItemCode] TO [MssExec]
GRANT INSERT ON  [dbo].[MilitaryAllocationItemCode] TO [MssExec]
GRANT DELETE ON  [dbo].[MilitaryAllocationItemCode] TO [MssExec]
GRANT UPDATE ON  [dbo].[MilitaryAllocationItemCode] TO [MssExec]
GO
Uses
Used By