Tables [dbo].[CustomerStatementRun]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)975
Created10:12:49 PM Thursday, December 28, 2006
Last Modified3:46:14 PM Tuesday, November 18, 2014
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_CustomerStatementRun: CustomerStatementRunIDCustomerStatementRunIDint4
No
1 - 1
Foreign Keys FK_CustomerStatementRun_CustomerStatementProfile: [dbo].[CustomerStatementProfile].CustomerStatementProfileFIDCustomerStatementProfileFIDint4
Yes
CustomerNumbervarchar(15)15
Yes
CustomerNamevarchar(65)65
Yes
StatementDatedatetime8
No
SummarizeToDatedatetime8
No
CutOffDatedatetime8
No
Messagevarchar(128)128
No
SuppressZeroBalancesFlagbit1
No
ExcludeCreditBalancesFlagbit1
No
PastDueBalancesFlagbit1
No
NonInvoicedItemsFlagbit1
No
ExcludeUnappliedPaymentsFlagbit1
No
ShowInvoiceDetailsFlagbit1
No
GeneratedDatedatetime8
No
Foreign Keys FK_CustomerStatementRun_SysUser: [dbo].[Sysuser].GeneratedBySysUserFIDIndexes IX_CustomerStatementRun_GeneratedBySysUserFID: GeneratedBySysUserFIDGeneratedBySysUserFIDint4
No
Foreign Keys FK_CustomerStatementRun_Branch: [dbo].[Branch].GeneratedBySysUserBranchFIDGeneratedBySysUserBranchFIDint4
No
Foreign Keys FK_CustomerStatementRun_HeaderBranchAddress: [dbo].[BranchAddress].HeaderBranchAddressFIDHeaderBranchAddressFIDint4
Yes
Foreign Keys FK_CustomerStatementRun_HeaderVanlineAddress: [dbo].[VanlineAddress].HeaderVanlineAddressFIDHeaderVanlineAddressFIDint4
Yes
Foreign Keys FK_CustomerStatementRun_RemittanceBranchAddress: [dbo].[BranchAddress].RemittanceBranchAddressFIDRemittanceBranchAddressFIDint4
Yes
Foreign Keys FK_CustomerStatementRun_RemittanceVanlineAddress: [dbo].[VanlineAddress].RemittanceVanlineAddressFIDRemittanceVanlineAddressFIDint4
Yes
Foreign Keys FK_CustomerStatementRun_CustomerStatementTitle: [dbo].[CustomerStatementTitle].CustomerStatementTitleFIDCustomerStatementTitleFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_CustomerStatementRun: CustomerStatementRunIDPK_CustomerStatementRunCustomerStatementRunID
Yes
80
IX_CustomerStatementRun_GeneratedBySysUserFIDGeneratedBySysUserFID
Foreign Keys Foreign Keys
NameColumns
FK_CustomerStatementRun_CustomerStatementProfileCustomerStatementProfileFID->[dbo].[CustomerStatementProfile].[CustomerStatementProfileID]
FK_CustomerStatementRun_CustomerStatementTitleCustomerStatementTitleFID->[dbo].[CustomerStatementTitle].[CustomerStatementTitleID]
FK_CustomerStatementRun_BranchGeneratedBySysUserBranchFID->[dbo].[Branch].[BranchPriKey]
FK_CustomerStatementRun_SysUserGeneratedBySysUserFID->[dbo].[Sysuser].[SysUserID]
FK_CustomerStatementRun_HeaderBranchAddressHeaderBranchAddressFID->[dbo].[BranchAddress].[BranchAddressID]
FK_CustomerStatementRun_HeaderVanlineAddressHeaderVanlineAddressFID->[dbo].[VanlineAddress].[VanlineAddressID]
FK_CustomerStatementRun_RemittanceBranchAddressRemittanceBranchAddressFID->[dbo].[BranchAddress].[BranchAddressID]
FK_CustomerStatementRun_RemittanceVanlineAddressRemittanceVanlineAddressFID->[dbo].[VanlineAddress].[VanlineAddressID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[CustomerStatementRun]
(
[CustomerStatementRunID] [int] NOT NULL IDENTITY(1, 1),
[CustomerStatementProfileFID] [int] NULL,
[CustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CustomerName] [varchar] (65) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[StatementDate] [datetime] NOT NULL,
[SummarizeToDate] [datetime] NOT NULL,
[CutOffDate] [datetime] NOT NULL,
[Message] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[SuppressZeroBalancesFlag] [bit] NOT NULL,
[ExcludeCreditBalancesFlag] [bit] NOT NULL,
[PastDueBalancesFlag] [bit] NOT NULL,
[NonInvoicedItemsFlag] [bit] NOT NULL,
[ExcludeUnappliedPaymentsFlag] [bit] NOT NULL,
[ShowInvoiceDetailsFlag] [bit] NOT NULL,
[GeneratedDate] [datetime] NOT NULL,
[GeneratedBySysUserFID] [int] NOT NULL,
[GeneratedBySysUserBranchFID] [int] NOT NULL,
[HeaderBranchAddressFID] [int] NULL,
[HeaderVanlineAddressFID] [int] NULL,
[RemittanceBranchAddressFID] [int] NULL,
[RemittanceVanlineAddressFID] [int] NULL,
[CustomerStatementTitleFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatementRun] ADD CONSTRAINT [PK_CustomerStatementRun] PRIMARY KEY NONCLUSTERED  ([CustomerStatementRunID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CustomerStatementRun_GeneratedBySysUserFID] ON [dbo].[CustomerStatementRun] ([GeneratedBySysUserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatementRun] ADD CONSTRAINT [FK_CustomerStatementRun_CustomerStatementProfile] FOREIGN KEY ([CustomerStatementProfileFID]) REFERENCES [dbo].[CustomerStatementProfile] ([CustomerStatementProfileID])
GO
ALTER TABLE [dbo].[CustomerStatementRun] ADD CONSTRAINT [FK_CustomerStatementRun_CustomerStatementTitle] FOREIGN KEY ([CustomerStatementTitleFID]) REFERENCES [dbo].[CustomerStatementTitle] ([CustomerStatementTitleID])
GO
ALTER TABLE [dbo].[CustomerStatementRun] ADD CONSTRAINT [FK_CustomerStatementRun_Branch] FOREIGN KEY ([GeneratedBySysUserBranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[CustomerStatementRun] ADD CONSTRAINT [FK_CustomerStatementRun_SysUser] FOREIGN KEY ([GeneratedBySysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[CustomerStatementRun] ADD CONSTRAINT [FK_CustomerStatementRun_HeaderBranchAddress] FOREIGN KEY ([HeaderBranchAddressFID]) REFERENCES [dbo].[BranchAddress] ([BranchAddressID])
GO
ALTER TABLE [dbo].[CustomerStatementRun] ADD CONSTRAINT [FK_CustomerStatementRun_HeaderVanlineAddress] FOREIGN KEY ([HeaderVanlineAddressFID]) REFERENCES [dbo].[VanlineAddress] ([VanlineAddressID])
GO
ALTER TABLE [dbo].[CustomerStatementRun] ADD CONSTRAINT [FK_CustomerStatementRun_RemittanceBranchAddress] FOREIGN KEY ([RemittanceBranchAddressFID]) REFERENCES [dbo].[BranchAddress] ([BranchAddressID])
GO
ALTER TABLE [dbo].[CustomerStatementRun] ADD CONSTRAINT [FK_CustomerStatementRun_RemittanceVanlineAddress] FOREIGN KEY ([RemittanceVanlineAddressFID]) REFERENCES [dbo].[VanlineAddress] ([VanlineAddressID])
GO
GRANT SELECT ON  [dbo].[CustomerStatementRun] TO [MssExec]
GRANT INSERT ON  [dbo].[CustomerStatementRun] TO [MssExec]
GRANT DELETE ON  [dbo].[CustomerStatementRun] TO [MssExec]
GRANT UPDATE ON  [dbo].[CustomerStatementRun] TO [MssExec]
GO
Uses
Used By