[dbo].[CustomerInvoiceReport]
CREATE TABLE [dbo].[CustomerInvoiceReport]
(
[CustomerInvoiceReportID] [int] NOT NULL IDENTITY(1, 1),
[CustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ReportFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerInvoiceReport] ADD CONSTRAINT [PK_CustomerInvoiceReport] PRIMARY KEY CLUSTERED ([CustomerInvoiceReportID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_CustomerInvoiceReport_CustomerNumber] ON [dbo].[CustomerInvoiceReport] ([CustomerNumber]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerInvoiceReport] ADD CONSTRAINT [FK_CustomerInvoiceReport_ReportFID] FOREIGN KEY ([ReportFID]) REFERENCES [dbo].[Reports] ([Prikey])
GO
GRANT SELECT ON [dbo].[CustomerInvoiceReport] TO [MssExec]
GRANT INSERT ON [dbo].[CustomerInvoiceReport] TO [MssExec]
GRANT DELETE ON [dbo].[CustomerInvoiceReport] TO [MssExec]
GRANT UPDATE ON [dbo].[CustomerInvoiceReport] TO [MssExec]
GO