[dbo].[AccountProfileContacts]
This table stores information for contacts assigned to a particular national account as a part of the national account profile
CREATE TABLE [dbo].[AccountProfileContacts]
(
[AccountProfileContactID] [int] NOT NULL IDENTITY(1, 1),
[AccountProfileFID] [int] NOT NULL,
[Contact] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Title] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[County] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Email] [varchar] (120) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MonitorOrders] [bit] NOT NULL CONSTRAINT [DF_AccountProfileContacts_MonitorOrders] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfileContacts] ADD CONSTRAINT [PK_AccountProfileContacts] PRIMARY KEY NONCLUSTERED ([AccountProfileContactID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [ix_AccountProfileContacts_AccountProfile] ON [dbo].[AccountProfileContacts] ([AccountProfileFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfileContacts] ADD CONSTRAINT [FK_AccountProfileContacts_AccountProfile] FOREIGN KEY ([AccountProfileFID]) REFERENCES [dbo].[AccountProfiles] ([AccountProfileID])
GO
GRANT SELECT ON [dbo].[AccountProfileContacts] TO [MssExec]
GRANT INSERT ON [dbo].[AccountProfileContacts] TO [MssExec]
GRANT DELETE ON [dbo].[AccountProfileContacts] TO [MssExec]
GRANT UPDATE ON [dbo].[AccountProfileContacts] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'This table stores information for contacts assigned to a particular national account as a part of the national account profile', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContacts', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key of this table', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContacts', 'COLUMN', N'AccountProfileContactID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a national account profile record', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContacts', 'COLUMN', N'AccountProfileFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Name of the contact assigned to the national account ', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContacts', 'COLUMN', N'Contact'
GO
EXEC sp_addextendedproperty N'MS_Description', N'County that the contact assigned to the national account is located in or represents', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContacts', 'COLUMN', N'County'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Email of the contact assigned to the national account', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContacts', 'COLUMN', N'Email'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Flag indicating whether the contact will be notified of changes made to orders assigned to them by means of the Monitor Orders Service (set to True) or not to (False)', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContacts', 'COLUMN', N'MonitorOrders'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Title of the contact assigned to the national account', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContacts', 'COLUMN', N'Title'
GO