• lsrep17 Documentation
  • Tables [Sales].[SalesPersonQuotaHistory]
    Sales performance tracking.
    PropertyValue
    Row Count (~)163
    Created13:14:19 14 marca 2012
    Last Modified13:14:55 14 marca 2012
    KeyNameData TypeMax Length (Bytes)Allow NullsDefaultDescription
    Cluster Primary Key PK_SalesPersonQuotaHistory_BusinessEntityID_QuotaDate: BusinessEntityID\QuotaDateForeign Keys FK_SalesPersonQuotaHistory_SalesPerson_BusinessEntityID: [Sales].[SalesPerson].BusinessEntityIDBusinessEntityIDint4
    False
    Sales person identification number. Foreign key to SalesPerson.BusinessEntityID.
    Cluster Primary Key PK_SalesPersonQuotaHistory_BusinessEntityID_QuotaDate: BusinessEntityID\QuotaDateQuotaDatedatetime8
    False
    Sales quota date.
    Check Constraints CK_SalesPersonQuotaHistory_SalesQuota : ([SalesQuota]>(0.00))SalesQuotamoney8
    False
    Sales quota amount.
    Indexes AK_SalesPersonQuotaHistory_rowguidrowguiduniqueidentifier16
    False
    (newid())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
    ModifiedDatedatetime8
    False
    (getdate())Date and time the record was last updated.
    KeyNameKey ColumnsUniqueDescription
    Cluster Primary Key PK_SalesPersonQuotaHistory_BusinessEntityID_QuotaDate: BusinessEntityID\QuotaDatePK_SalesPersonQuotaHistory_BusinessEntityID_QuotaDateBusinessEntityID, QuotaDate
    True
    Primary key (clustered) constraint
    AK_SalesPersonQuotaHistory_rowguidrowguid
    True
    Unique nonclustered index. Used to support replication samples.
    NameOn ColumnConstraintDescription
    CK_SalesPersonQuotaHistory_SalesQuotaSalesQuota([SalesQuota]>(0.00))Check constraint [SalesQuota] > (0.00)
    NameColumnsDescription
    FK_SalesPersonQuotaHistory_SalesPerson_BusinessEntityIDBusinessEntityID->[Sales].[SalesPerson].[BusinessEntityID]Foreign key constraint referencing SalesPerson.SalesPersonID.
    CREATE TABLE [Sales].[SalesPersonQuotaHistory]
    (
    [BusinessEntityID] [int] NOT NULL,
    [QuotaDate] [datetime] NOT NULL,
    [SalesQuota] [money] NOT NULL,
    [rowguid] [uniqueidentifier] NOT NULL ROWGUIDCOL CONSTRAINT [DF_SalesPersonQuotaHistory_rowguid] DEFAULT (newid()),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_SalesPersonQuotaHistory_ModifiedDate] DEFAULT (getdate())
    ) ON [PRIMARY]
    GO
    ALTER TABLE [Sales].[SalesPersonQuotaHistory] ADD CONSTRAINT [CK_SalesPersonQuotaHistory_SalesQuota] CHECK (([SalesQuota]>(0.00)))
    GO
    ALTER TABLE [Sales].[SalesPersonQuotaHistory] ADD CONSTRAINT [PK_SalesPersonQuotaHistory_BusinessEntityID_QuotaDate] PRIMARY KEY CLUSTERED  ([BusinessEntityID], [QuotaDate]) ON [PRIMARY]
    GO
    CREATE UNIQUE NONCLUSTERED INDEX [AK_SalesPersonQuotaHistory_rowguid] ON [Sales].[SalesPersonQuotaHistory] ([rowguid]) ON [PRIMARY]
    GO
    ALTER TABLE [Sales].[SalesPersonQuotaHistory] ADD CONSTRAINT [FK_SalesPersonQuotaHistory_SalesPerson_BusinessEntityID] FOREIGN KEY ([BusinessEntityID]) REFERENCES [Sales].[SalesPerson] ([BusinessEntityID])
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Sales performance tracking.', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', NULL, NULL
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Sales person identification number. Foreign key to SalesPerson.BusinessEntityID.', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', 'COLUMN', N'BusinessEntityID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Date and time the record was last updated.', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', 'COLUMN', N'ModifiedDate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Sales quota date.', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', 'COLUMN', N'QuotaDate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', 'COLUMN', N'rowguid'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Sales quota amount.', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', 'COLUMN', N'SalesQuota'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Check constraint [SalesQuota] > (0.00)', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', 'CONSTRAINT', N'CK_SalesPersonQuotaHistory_SalesQuota'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of GETDATE()', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', 'CONSTRAINT', N'DF_SalesPersonQuotaHistory_ModifiedDate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Default constraint value of NEWID()', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', 'CONSTRAINT', N'DF_SalesPersonQuotaHistory_rowguid'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Foreign key constraint referencing SalesPerson.SalesPersonID.', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', 'CONSTRAINT', N'FK_SalesPersonQuotaHistory_SalesPerson_BusinessEntityID'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Primary key (clustered) constraint', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', 'CONSTRAINT', N'PK_SalesPersonQuotaHistory_BusinessEntityID_QuotaDate'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Unique nonclustered index. Used to support replication samples.', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', 'INDEX', N'AK_SalesPersonQuotaHistory_rowguid'
    GO
    EXEC sp_addextendedproperty N'MS_Description', N'Clustered index created by a primary key constraint.', 'SCHEMA', N'Sales', 'TABLE', N'SalesPersonQuotaHistory', 'INDEX', N'PK_SalesPersonQuotaHistory_BusinessEntityID_QuotaDate'
    GO