Tables [dbo].[Accounts]
This table stores national account records
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)38
Created4:57:07 PM Thursday, September 7, 2006
Last Modified7:37:21 PM Thursday, August 29, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefaultDescription
Indexes IX_Accounts: AcctNoAcctNovarchar(15)15
No
National account identification number
AcctNamevarchar(30)30
No
National account name
Contactvarchar(30)30
Yes
Name of the primary contact
Countyvarchar(3)3
Yes
Count code for the national account
Notevarchar(60)60
Yes
Default note associated to the national account
UserDefinedLabel1varchar(30)30
Yes
User defined label in position 1 for the Customer Specific fields
UserDefinedLabel2varchar(30)30
Yes
User defined label in position 2 for the Customer Specific fields
UserDefinedLabel3varchar(30)30
Yes
User defined label in position 3 for the Customer Specific fields
UserDefinedLabel4varchar(30)30
Yes
User defined label in position 4 for the Customer Specific fields
UserDefinedLabel5varchar(30)30
Yes
User defined label in position 5 for the Customer Specific fields
UserDefinedLabel6varchar(30)30
Yes
User defined label in position 6 for the Customer Specific fields
UserDefinedLabel7varchar(30)30
Yes
User defined label in position 7 for the Customer Specific fields
UserDefinedLabel8varchar(30)30
Yes
User defined label in position 8 for the Customer Specific fields
UserDefinedActive1int4
Yes
Set this flag to 1 to activate the User Defined Label 1 value
UserDefinedActive2int4
Yes
Set this flag to 1 to activate the User Defined Label 2 value
UserDefinedActive3int4
Yes
Set this flag to 1 to activate the User Defined Label 3 value
UserDefinedActive4int4
Yes
Set this flag to 1 to activate the User Defined Label 4 value
UserDefinedActive5int4
Yes
Set this flag to 1 to activate the User Defined Label 5 value
UserDefinedActive6int4
Yes
Set this flag to 1 to activate the User Defined Label 6 value
UserDefinedActive7int4
Yes
Set this flag to 1 to activate the User Defined Label 7 value
UserDefinedActive8int4
Yes
Set this flag to 1 to activate the User Defined Label 8 value
Primary Key PK_ACCOUNTS: AccountPriKeyAccountPriKeyint4
No
1 - 1Primary key of this table
Foreign Keys FK_ACCOUNTS_BRANCH: [dbo].[Branch].BranchPriKeyBranchPriKeyint4
No
Key linking this table to a particular branch
DepartmentAgencyvarchar(32)32
Yes
Department or agency that the national account belongs to
BureauServicevarchar(32)32
Yes
Credit bureau services that the national account belongs to
Inactivebit1
No
((0))
DefaultLocationCodevarchar(15)15
Yes
DefaultClientIDvarchar(30)30
Yes
DefaultSubAccountvarchar(30)30
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_ACCOUNTS: AccountPriKeyPK_ACCOUNTSAccountPriKey
Yes
80
IX_AccountsAcctNo
Yes
80
Foreign Keys Foreign Keys
NameColumns
FK_ACCOUNTS_BRANCHBranchPriKey->[dbo].[Branch].[BranchPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[Accounts]
(
[AcctNo] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[AcctName] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Contact] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[County] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Note] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UserDefinedLabel1] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UserDefinedLabel2] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UserDefinedLabel3] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UserDefinedLabel4] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UserDefinedLabel5] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UserDefinedLabel6] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UserDefinedLabel7] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UserDefinedLabel8] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UserDefinedActive1] [int] NULL,
[UserDefinedActive2] [int] NULL,
[UserDefinedActive3] [int] NULL,
[UserDefinedActive4] [int] NULL,
[UserDefinedActive5] [int] NULL,
[UserDefinedActive6] [int] NULL,
[UserDefinedActive7] [int] NULL,
[UserDefinedActive8] [int] NULL,
[AccountPriKey] [int] NOT NULL IDENTITY(1, 1),
[BranchPriKey] [int] NOT NULL,
[DepartmentAgency] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BureauService] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Inactive] [bit] NOT NULL CONSTRAINT [DF_Accounts_Inactive] DEFAULT ((0)),
[DefaultLocationCode] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DefaultClientID] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DefaultSubAccount] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Accounts] ADD CONSTRAINT [PK_ACCOUNTS] PRIMARY KEY NONCLUSTERED  ([AccountPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Accounts] ADD CONSTRAINT [IX_Accounts] UNIQUE NONCLUSTERED  ([AcctNo]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Accounts] ADD CONSTRAINT [FK_ACCOUNTS_BRANCH] FOREIGN KEY ([BranchPriKey]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
GRANT SELECT ON  [dbo].[Accounts] TO [MssExec]
GRANT INSERT ON  [dbo].[Accounts] TO [MssExec]
GRANT DELETE ON  [dbo].[Accounts] TO [MssExec]
GRANT UPDATE ON  [dbo].[Accounts] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'This table stores national account records', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key of this table', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'AccountPriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'National account name', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'AcctName'
GO
EXEC sp_addextendedproperty N'MS_Description', N'National account identification number', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'AcctNo'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular branch', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'BranchPriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Credit bureau services that the national account belongs to', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'BureauService'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Name of the primary contact', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'Contact'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Count code for the national account', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'County'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Department or agency that the national account belongs to', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'DepartmentAgency'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Default note associated to the national account', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'Note'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Set this flag to 1 to activate the User Defined Label 1 value', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedActive1'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Set this flag to 1 to activate the User Defined Label 2 value', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedActive2'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Set this flag to 1 to activate the User Defined Label 3 value', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedActive3'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Set this flag to 1 to activate the User Defined Label 4 value', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedActive4'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Set this flag to 1 to activate the User Defined Label 5 value', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedActive5'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Set this flag to 1 to activate the User Defined Label 6 value', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedActive6'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Set this flag to 1 to activate the User Defined Label 7 value', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedActive7'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Set this flag to 1 to activate the User Defined Label 8 value', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedActive8'
GO
EXEC sp_addextendedproperty N'MS_Description', N'User defined label in position 1 for the Customer Specific fields', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedLabel1'
GO
EXEC sp_addextendedproperty N'MS_Description', N'User defined label in position 2 for the Customer Specific fields', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedLabel2'
GO
EXEC sp_addextendedproperty N'MS_Description', N'User defined label in position 3 for the Customer Specific fields', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedLabel3'
GO
EXEC sp_addextendedproperty N'MS_Description', N'User defined label in position 4 for the Customer Specific fields', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedLabel4'
GO
EXEC sp_addextendedproperty N'MS_Description', N'User defined label in position 5 for the Customer Specific fields', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedLabel5'
GO
EXEC sp_addextendedproperty N'MS_Description', N'User defined label in position 6 for the Customer Specific fields', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedLabel6'
GO
EXEC sp_addextendedproperty N'MS_Description', N'User defined label in position 7 for the Customer Specific fields', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedLabel7'
GO
EXEC sp_addextendedproperty N'MS_Description', N'User defined label in position 8 for the Customer Specific fields', 'SCHEMA', N'dbo', 'TABLE', N'Accounts', 'COLUMN', N'UserDefinedLabel8'
GO
Uses
Used By