[dbo].[CustomerStatementRunStatementCycle]
CREATE TABLE [dbo].[CustomerStatementRunStatementCycle]
(
[CustomerStatementRunStatementCycleID] [int] NOT NULL IDENTITY(1, 1),
[CustomerStatementRunFID] [int] NOT NULL,
[StatementCycleID] [smallint] NULL,
[StatementCycle] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatementRunStatementCycle] ADD CONSTRAINT [PK_CustomerStatementRunStatementCycle] PRIMARY KEY NONCLUSTERED ([CustomerStatementRunStatementCycleID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatementRunStatementCycle] ADD CONSTRAINT [IX_CustomerStatementRunStatementCycle_StatementCycleID] UNIQUE CLUSTERED ([CustomerStatementRunFID], [StatementCycleID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatementRunStatementCycle] ADD CONSTRAINT [FK_CustomerStatementRunStatementCycle_CustomerStatementRun] FOREIGN KEY ([CustomerStatementRunFID]) REFERENCES [dbo].[CustomerStatementRun] ([CustomerStatementRunID])
GO
GRANT SELECT ON [dbo].[CustomerStatementRunStatementCycle] TO [MssExec]
GRANT INSERT ON [dbo].[CustomerStatementRunStatementCycle] TO [MssExec]
GRANT DELETE ON [dbo].[CustomerStatementRunStatementCycle] TO [MssExec]
GRANT UPDATE ON [dbo].[CustomerStatementRunStatementCycle] TO [MssExec]
GO