Tables [dbo].[VanlineStatementHeader]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created8:51:07 AM Thursday, December 5, 2024
Last Modified8:51:10 AM Thursday, December 5, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_VanlineStatementHeader: VanlineStatementHeaderIDVanlineStatementHeaderIDint4
No
1 - 1
Indexes IX_VanlineStatementHeader_AgentDate: AgentNumber\StatementDate\VanlineGroupExternalCodeIndexes IX_VanlineStatementHeader_AgentYearNumber: AgentNumber\StatementYear\StatementNumber\VanlineGroupExternalCodeVanlineGroupExternalCodevarchar(10)10
No
Foreign Keys FK_VanlineStatementHeader_VanlineGroup: [dbo].[VanlineGroup].VanlineGroupFIDVanlineGroupFIDint4
Yes
Indexes IX_VanlineStatementHeader_AgentDate: AgentNumber\StatementDate\VanlineGroupExternalCodeIndexes IX_VanlineStatementHeader_AgentYearNumber: AgentNumber\StatementYear\StatementNumber\VanlineGroupExternalCodeAgentNumbervarchar(10)10
No
Foreign Keys FK_VanlineStatementHeader_Agent: [dbo].[Agent].AgentFIDAgentFIDint4
Yes
Indexes IX_VanlineStatementHeader_AgentDate: AgentNumber\StatementDate\VanlineGroupExternalCodeStatementDatedatetime8
No
Indexes IX_VanlineStatementHeader_AgentYearNumber: AgentNumber\StatementYear\StatementNumber\VanlineGroupExternalCodeStatementYearint4
No
Indexes IX_VanlineStatementHeader_AgentYearNumber: AgentNumber\StatementYear\StatementNumber\VanlineGroupExternalCodeStatementNumberint4
No
CreatedDatedatetime8
No
LastReceivedDatedatetime8
No
StatementDescriptionvarchar(30)30
Yes
IsCRBatchbit1
Yes
IsVanLineStatementbit1
Yes
AutoApplybit1
Yes
Importablebit1
No
ImportBeganbit1
No
((0))
ImportingByint4
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_VanlineStatementHeader: VanlineStatementHeaderIDPK_VanlineStatementHeaderVanlineStatementHeaderID
Yes
IX_VanlineStatementHeader_AgentDateAgentNumber, StatementDate, VanlineGroupExternalCode
IX_VanlineStatementHeader_AgentYearNumberAgentNumber, StatementYear, StatementNumber, VanlineGroupExternalCode
Foreign Keys Foreign Keys
NameColumns
FK_VanlineStatementHeader_AgentAgentFID->[dbo].[Agent].[AgentPriKey]
FK_VanlineStatementHeader_VanlineGroupVanlineGroupFID->[dbo].[VanlineGroup].[VanlineGroupID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[VanlineStatementHeader]
(
[VanlineStatementHeaderID] [int] NOT NULL IDENTITY(1, 1),
[VanlineGroupExternalCode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VanlineGroupFID] [int] NULL,
[AgentNumber] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[AgentFID] [int] NULL,
[StatementDate] [datetime] NOT NULL,
[StatementYear] [int] NOT NULL,
[StatementNumber] [int] NOT NULL,
[CreatedDate] [datetime] NOT NULL,
[LastReceivedDate] [datetime] NOT NULL,
[StatementDescription] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsCRBatch] [bit] NULL,
[IsVanLineStatement] [bit] NULL,
[AutoApply] [bit] NULL,
[Importable] [bit] NOT NULL,
[ImportBegan] [bit] NOT NULL CONSTRAINT [DF_VanlineStatementHeader_ImportBegan] DEFAULT ((0)),
[ImportingBy] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineStatementHeader] ADD CONSTRAINT [PK_VanlineStatementHeader] PRIMARY KEY CLUSTERED  ([VanlineStatementHeaderID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_VanlineStatementHeader_AgentDate] ON [dbo].[VanlineStatementHeader] ([AgentNumber], [StatementDate], [VanlineGroupExternalCode]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_VanlineStatementHeader_AgentYearNumber] ON [dbo].[VanlineStatementHeader] ([AgentNumber], [StatementYear], [StatementNumber], [VanlineGroupExternalCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineStatementHeader] ADD CONSTRAINT [FK_VanlineStatementHeader_Agent] FOREIGN KEY ([AgentFID]) REFERENCES [dbo].[Agent] ([AgentPriKey])
GO
ALTER TABLE [dbo].[VanlineStatementHeader] ADD CONSTRAINT [FK_VanlineStatementHeader_VanlineGroup] FOREIGN KEY ([VanlineGroupFID]) REFERENCES [dbo].[VanlineGroup] ([VanlineGroupID])
GO
GRANT SELECT ON  [dbo].[VanlineStatementHeader] TO [MssExec]
GRANT INSERT ON  [dbo].[VanlineStatementHeader] TO [MssExec]
GRANT DELETE ON  [dbo].[VanlineStatementHeader] TO [MssExec]
GRANT UPDATE ON  [dbo].[VanlineStatementHeader] TO [MssExec]
GO
Uses
Used By