Tables [dbo].[GLARAP]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)44
Created4:57:06 PM Thursday, September 7, 2006
Last Modified11:13:39 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_GLARAP: GLAPriKeyGLAPriKeyint4
No
1 - 1
Foreign Keys FK_GLARAP_GLControl: [dbo].[GLControl].GLCPriKeyIndexes IX_GLARAP_GLCPriKey: GLCPriKeyIndexes IX_GLARAP_UniqueColumns: GLCPriKey\TTPriKey\AuthPriKey\CommodityPriKey\MTGroupPriKey\DTPriKeyGLCPriKeyint4
No
GLAccountvarchar(16)16
Yes
GLSubAccountvarchar(16)16
Yes
Foreign Keys FK_GLARAP_CommType: [dbo].[CommType].CommodityPriKeyIndexes IX_GLARAP_UniqueColumns: GLCPriKey\TTPriKey\AuthPriKey\CommodityPriKey\MTGroupPriKey\DTPriKeyCommodityPriKeyint4
Yes
Foreign Keys FK_GLARAP_TransactionType: [dbo].[TransactionType].TTPriKeyIndexes IX_GLARAP_UniqueColumns: GLCPriKey\TTPriKey\AuthPriKey\CommodityPriKey\MTGroupPriKey\DTPriKeyIndexes IX_GLARAP_TTPriKey: TTPriKeyTTPriKeyint4
No
Foreign Keys FK_GLARAP_AUTHORITYTYPES: [dbo].[AuthorityTypes].AuthPriKeyIndexes IX_GLARAP_UniqueColumns: GLCPriKey\TTPriKey\AuthPriKey\CommodityPriKey\MTGroupPriKey\DTPriKeyAuthPriKeyint4
Yes
Foreign Keys FK_GLARAP_DriverTypes: [dbo].[DriverTypes].DTPriKeyIndexes IX_GLARAP_UniqueColumns: GLCPriKey\TTPriKey\AuthPriKey\CommodityPriKey\MTGroupPriKey\DTPriKeyDTPriKeyint4
Yes
GLDefaultchar(1)1
Yes
Foreign Keys FK_GLARAP_MoveTypeGroups: [dbo].[MoveTypeGroups].MTGroupPriKeyIndexes IX_GLARAP_UniqueColumns: GLCPriKey\TTPriKey\AuthPriKey\CommodityPriKey\MTGroupPriKey\DTPriKeyMTGroupPriKeyint4
Yes
ManualGLsmallint2
Yes
OverrideGLNumbervarchar(66)66
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_GLARAP: GLAPriKeyPK_GLARAPGLAPriKey
Yes
80
IX_GLARAP_UniqueColumnsGLCPriKey, TTPriKey, AuthPriKey, CommodityPriKey, MTGroupPriKey, DTPriKey
Yes
80
IX_GLARAP_GLCPriKeyGLCPriKey80
IX_GLARAP_TTPriKeyTTPriKey80
Foreign Keys Foreign Keys
NameColumns
FK_GLARAP_AUTHORITYTYPESAuthPriKey->[dbo].[AuthorityTypes].[AuthPriKey]
FK_GLARAP_CommTypeCommodityPriKey->[dbo].[CommType].[PriKey]
FK_GLARAP_DriverTypesDTPriKey->[dbo].[DriverTypes].[DTPriKey]
FK_GLARAP_GLControlGLCPriKey->[dbo].[GLControl].[GLCPriKey]
FK_GLARAP_MoveTypeGroupsMTGroupPriKey->[dbo].[MoveTypeGroups].[MTGroupPriKey]
FK_GLARAP_TransactionTypeTTPriKey->[dbo].[TransactionType].[TTPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[GLARAP]
(
[GLAPriKey] [int] NOT NULL IDENTITY(1, 1),
[GLCPriKey] [int] NOT NULL,
[GLAccount] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[GLSubAccount] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CommodityPriKey] [int] NULL,
[TTPriKey] [int] NOT NULL,
[AuthPriKey] [int] NULL,
[DTPriKey] [int] NULL,
[GLDefault] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MTGroupPriKey] [int] NULL,
[ManualGL] [smallint] NULL,
[OverrideGLNumber] [varchar] (66) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[GLARAP] ADD CONSTRAINT [PK_GLARAP] PRIMARY KEY CLUSTERED  ([GLAPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[GLARAP] ADD CONSTRAINT [IX_GLARAP_UniqueColumns] UNIQUE NONCLUSTERED  ([GLCPriKey], [TTPriKey], [AuthPriKey], [CommodityPriKey], [MTGroupPriKey], [DTPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_GLARAP_GLCPriKey] ON [dbo].[GLARAP] ([GLCPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_GLARAP_TTPriKey] ON [dbo].[GLARAP] ([TTPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[GLARAP] ADD CONSTRAINT [FK_GLARAP_AUTHORITYTYPES] FOREIGN KEY ([AuthPriKey]) REFERENCES [dbo].[AuthorityTypes] ([AuthPriKey])
GO
ALTER TABLE [dbo].[GLARAP] ADD CONSTRAINT [FK_GLARAP_CommType] FOREIGN KEY ([CommodityPriKey]) REFERENCES [dbo].[CommType] ([PriKey])
GO
ALTER TABLE [dbo].[GLARAP] ADD CONSTRAINT [FK_GLARAP_DriverTypes] FOREIGN KEY ([DTPriKey]) REFERENCES [dbo].[DriverTypes] ([DTPriKey])
GO
ALTER TABLE [dbo].[GLARAP] ADD CONSTRAINT [FK_GLARAP_GLControl] FOREIGN KEY ([GLCPriKey]) REFERENCES [dbo].[GLControl] ([GLCPriKey])
GO
ALTER TABLE [dbo].[GLARAP] ADD CONSTRAINT [FK_GLARAP_MoveTypeGroups] FOREIGN KEY ([MTGroupPriKey]) REFERENCES [dbo].[MoveTypeGroups] ([MTGroupPriKey])
GO
ALTER TABLE [dbo].[GLARAP] ADD CONSTRAINT [FK_GLARAP_TransactionType] FOREIGN KEY ([TTPriKey]) REFERENCES [dbo].[TransactionType] ([TTPriKey])
GO
GRANT SELECT ON  [dbo].[GLARAP] TO [MssExec]
GRANT INSERT ON  [dbo].[GLARAP] TO [MssExec]
GRANT DELETE ON  [dbo].[GLARAP] TO [MssExec]
GRANT UPDATE ON  [dbo].[GLARAP] TO [MssExec]
GO
Uses