Tables [dbo].[AccountProfiles]
This table stores information on profiles associated to a particular national account as created through the Account Profile Management interface
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)23
Created4:57:05 PM Thursday, September 7, 2006
Last Modified9:11:26 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefaultDescription
Primary Key PK_AccountProfiles: AccountProfileIDAccountProfileIDint4
No
1 - 1Primary key of this table
Namevarchar(30)30
No
Name of a particular account profile record
Foreign Keys FK_AccountProfiles_ContractMaster: [dbo].[ContractMaster].ContractMasterFIDContractMasterFIDint4
Yes
Key linking this table to a particular contract master
Foreign Keys FK_AccountProfiles_PROFILES: [dbo].[Profiles].ProfileFIDProfileFIDint4
Yes
Key linking this table to a particular profile (Task Definition)
Foreign Keys FK_AccountProfiles_Rollouts: [dbo].[RollOuts].RolloutFIDRolloutFIDint4
Yes
Key linking this table to a particular rollout (Task Group)
Foreign Keys FK_AccountProfiles_RatePlans: [dbo].[RatePlans].RatePlanFIDRatePlanFIDint4
Yes
Key linking this table to a particular rate plan
Foreign Keys FK_AccountProfiles_Sysuser: [dbo].[Sysuser].CoordinatorFIDIndexes IX_AccountProfiles_CoordinatorFID: CoordinatorFIDCoordinatorFIDint4
Yes
Key linking this table to a particular coordinator
Foreign Keys FK_AccountProfiles_Sysuser1: [dbo].[Sysuser].SalesPersonFIDIndexes IX_AccountProfiles_SalesPersonFID: SalesPersonFIDSalesPersonFIDint4
Yes
Key linking this table to a particular sales person
Foreign Keys FK_AccountProfiles_Sysuser2: [dbo].[Sysuser].LogisticCoordinatorFIDIndexes IX_AccountProfiles_LogisticCoordinatorFID: LogisticCoordinatorFIDLogisticCoordinatorFIDint4
Yes
Key linking this table to a particular logistics coordinator
Foreign Keys FK_AccountProfiles_Sysuser3: [dbo].[Sysuser].RevenueClerkFIDIndexes IX_AccountProfiles_RevenueClerkFID: RevenueClerkFIDRevenueClerkFIDint4
Yes
Key linking this table to a particular revenue clerk
Foreign Keys FK_AccountProfiles_Accounts: [dbo].[Accounts].AccountFIDAccountFIDint4
Yes
Key linking this table to a particular national account
CustomerNumbervarchar(15)15
Yes
Identification number of the customer assigned to the profile
SpecInstOrigvarchar(1024)1024
Yes
Default special origin instructions to be associated to the profile when it is assigned to an order
SpecInstDestvarchar(1024)1024
Yes
Default special destination instructions to be associated to the profile when it is assigned to an order
BillToContactvarchar(61)61
Yes
Default billing contact person for the national account profile
BillToAddrvarchar(256)256
Yes
Street address for the billing contact person for the national account profile
BillToCityvarchar(26)26
Yes
City for the billing contact person for the national account profile
BillToStatevarchar(2)2
Yes
State for the billing contact person for the national account profile
BillToZipvarchar(10)10
Yes
Postal mailing code for the billing contact person for the national account profile
GeneralNotestextmax
Yes
Postal mailing code for the billing contact person for the national account profile
CustomerAddressCodevarchar(15)15
Yes
Code used to identify the customer address, such as �PRIMARY�, and is generally used for third party applications
BillToCountryNamevarchar(61)61
Yes
Country of the billing contact person for the national account profile
Foreign Keys FK_AccountProfiles_InvoiceTermsOverrideOption: [dbo].[InvoiceTermsOverrideOption].InvoiceTermsOverrideOptionFIDInvoiceTermsOverrideOptionFIDint4
No
((1))Key linking this table to a particular invoice terms override option
Foreign Keys FK_AccountProfiles_Valuation: [dbo].[Valuation].ValuationFIDValuationFIDint4
Yes
Key linking this table to a particular valuation option
ValuationPerPoundFIDint4
Yes
Key linking this table to a particular valuation per pound option
Inactivebit1
No
((0))
Foreign Keys FK_AccountProfiles_LaborRatingGroup: [dbo].[LaborRatingGroup].LaborRatingGroupFIDLaborRatingGroupFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_AccountProfiles: AccountProfileIDPK_AccountProfilesAccountProfileID
Yes
80
IX_AccountProfiles_CoordinatorFIDCoordinatorFID
IX_AccountProfiles_LogisticCoordinatorFIDLogisticCoordinatorFID
IX_AccountProfiles_RevenueClerkFIDRevenueClerkFID
IX_AccountProfiles_SalesPersonFIDSalesPersonFID
Foreign Keys Foreign Keys
NameColumns
FK_AccountProfiles_AccountsAccountFID->[dbo].[Accounts].[AccountPriKey]
FK_AccountProfiles_ContractMasterContractMasterFID->[dbo].[ContractMaster].[CMPriKey]
FK_AccountProfiles_SysuserCoordinatorFID->[dbo].[Sysuser].[SysUserID]
FK_AccountProfiles_InvoiceTermsOverrideOptionInvoiceTermsOverrideOptionFID->[dbo].[InvoiceTermsOverrideOption].[InvoiceTermsOverrideOptionID]
FK_AccountProfiles_LaborRatingGroupLaborRatingGroupFID->[dbo].[LaborRatingGroup].[LaborRatingGroupID]
FK_AccountProfiles_Sysuser2LogisticCoordinatorFID->[dbo].[Sysuser].[SysUserID]
FK_AccountProfiles_PROFILESProfileFID->[dbo].[Profiles].[ProfileID]
FK_AccountProfiles_RatePlansRatePlanFID->[dbo].[RatePlans].[RPPriKey]
FK_AccountProfiles_Sysuser3RevenueClerkFID->[dbo].[Sysuser].[SysUserID]
FK_AccountProfiles_RolloutsRolloutFID->[dbo].[RollOuts].[RollOutID]
FK_AccountProfiles_Sysuser1SalesPersonFID->[dbo].[Sysuser].[SysUserID]
FK_AccountProfiles_ValuationValuationFID->[dbo].[Valuation].[ValuationID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[AccountProfiles]
(
[AccountProfileID] [int] NOT NULL IDENTITY(1, 1),
[Name] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ContractMasterFID] [int] NULL,
[ProfileFID] [int] NULL,
[RolloutFID] [int] NULL,
[RatePlanFID] [int] NULL,
[CoordinatorFID] [int] NULL,
[SalesPersonFID] [int] NULL,
[LogisticCoordinatorFID] [int] NULL,
[RevenueClerkFID] [int] NULL,
[AccountFID] [int] NULL,
[CustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SpecInstOrig] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SpecInstDest] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillToContact] [varchar] (61) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillToAddr] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillToCity] [varchar] (26) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillToState] [varchar] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillToZip] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[GeneralNotes] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CustomerAddressCode] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillToCountryName] [varchar] (61) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[InvoiceTermsOverrideOptionFID] [int] NOT NULL CONSTRAINT [DF_AccountProfiles_InvoiceTermsOverrideOptionFID] DEFAULT ((1)),
[ValuationFID] [int] NULL,
[ValuationPerPoundFID] [int] NULL,
[Inactive] [bit] NOT NULL CONSTRAINT [DF_AccountProfiles_Inactive] DEFAULT ((0)),
[LaborRatingGroupFID] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [PK_AccountProfiles] PRIMARY KEY NONCLUSTERED  ([AccountProfileID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AccountProfiles_CoordinatorFID] ON [dbo].[AccountProfiles] ([CoordinatorFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AccountProfiles_LogisticCoordinatorFID] ON [dbo].[AccountProfiles] ([LogisticCoordinatorFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AccountProfiles_RevenueClerkFID] ON [dbo].[AccountProfiles] ([RevenueClerkFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AccountProfiles_SalesPersonFID] ON [dbo].[AccountProfiles] ([SalesPersonFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [FK_AccountProfiles_Accounts] FOREIGN KEY ([AccountFID]) REFERENCES [dbo].[Accounts] ([AccountPriKey])
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [FK_AccountProfiles_ContractMaster] FOREIGN KEY ([ContractMasterFID]) REFERENCES [dbo].[ContractMaster] ([CMPriKey])
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [FK_AccountProfiles_Sysuser] FOREIGN KEY ([CoordinatorFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [FK_AccountProfiles_InvoiceTermsOverrideOption] FOREIGN KEY ([InvoiceTermsOverrideOptionFID]) REFERENCES [dbo].[InvoiceTermsOverrideOption] ([InvoiceTermsOverrideOptionID])
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [FK_AccountProfiles_LaborRatingGroup] FOREIGN KEY ([LaborRatingGroupFID]) REFERENCES [dbo].[LaborRatingGroup] ([LaborRatingGroupID])
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [FK_AccountProfiles_Sysuser2] FOREIGN KEY ([LogisticCoordinatorFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [FK_AccountProfiles_PROFILES] FOREIGN KEY ([ProfileFID]) REFERENCES [dbo].[Profiles] ([ProfileID])
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [FK_AccountProfiles_RatePlans] FOREIGN KEY ([RatePlanFID]) REFERENCES [dbo].[RatePlans] ([RPPriKey])
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [FK_AccountProfiles_Sysuser3] FOREIGN KEY ([RevenueClerkFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [FK_AccountProfiles_Rollouts] FOREIGN KEY ([RolloutFID]) REFERENCES [dbo].[RollOuts] ([RollOutID])
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [FK_AccountProfiles_Sysuser1] FOREIGN KEY ([SalesPersonFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[AccountProfiles] ADD CONSTRAINT [FK_AccountProfiles_Valuation] FOREIGN KEY ([ValuationFID]) REFERENCES [dbo].[Valuation] ([ValuationID])
GO
GRANT SELECT ON  [dbo].[AccountProfiles] TO [MssExec]
GRANT INSERT ON  [dbo].[AccountProfiles] TO [MssExec]
GRANT DELETE ON  [dbo].[AccountProfiles] TO [MssExec]
GRANT UPDATE ON  [dbo].[AccountProfiles] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'This table stores information on profiles associated to a particular national account as created through the Account Profile Management interface', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular national account', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'AccountFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key of this table', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'AccountProfileID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Street address for the billing contact person for the national account profile', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'BillToAddr'
GO
EXEC sp_addextendedproperty N'MS_Description', N'City for the billing contact person for the national account profile', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'BillToCity'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default billing contact person for the national account profile', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'BillToContact'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Country of the billing contact person for the national account profile', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'BillToCountryName'
GO
EXEC sp_addextendedproperty N'MS_Description', N'State for the billing contact person for the national account profile', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'BillToState'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Postal mailing code for the billing contact person for the national account profile', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'BillToZip'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular contract master ', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'ContractMasterFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular coordinator', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'CoordinatorFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Code used to identify the customer address, such as �PRIMARY�, and is generally used for third party applications', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'CustomerAddressCode'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Identification number of the customer assigned to the profile', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'CustomerNumber'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Postal mailing code for the billing contact person for the national account profile', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'GeneralNotes'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular invoice terms override option', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'InvoiceTermsOverrideOptionFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular logistics coordinator', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'LogisticCoordinatorFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Name of a particular account profile record', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'Name'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular profile (Task Definition)', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'ProfileFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular rate plan', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'RatePlanFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular revenue clerk', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'RevenueClerkFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular rollout (Task Group)', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'RolloutFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular sales person', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'SalesPersonFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default special destination instructions to be associated to the profile when it is assigned to an order', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'SpecInstDest'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default special origin instructions to be associated to the profile when it is assigned to an order', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'SpecInstOrig'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular valuation option', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'ValuationFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular valuation per pound option ', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfiles', 'COLUMN', N'ValuationPerPoundFID'
GO
Uses
Used By