OPPORTUNITYAMOUNTBRACKET

Contains thresholds and descriptions for each opportunity amount bracket.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
NAME nvarchar(100) Default = ''
LOWERLIMIT money Default = 0
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.
ORGANIZATIONLOWERLIMIT money Default = 0

Foreign Keys

Foreign Key Field Type Null Notes Description
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
OPPORTUNITYBRACKETGROUPID uniqueidentifier yes OPPORTUNITYAMOUNTBRACKETGROUP.ID FK to OPPORTUNITYAMOUNTBRACKETGROUP
BASECURRENCYID uniqueidentifier yes CURRENCY.ID FK to CURRENCY
ORGANIZATIONEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID FK to CURRENCYEXCHANGERATE

Indexes

Index Name Fields Unique Primary Clustered
IX_OPPORTUNITYAMOUNTBRACKET_DATEADDED DATEADDED yes
IX_OPPORTUNITYAMOUNTBRACKET_DATECHANGED DATECHANGED
IX_OPPORTUNITYAMOUNTBRACKET_LOWERLIMIT LOWERLIMIT
PK_OPPORTUNITYAMOUNTBRACKET ID yes yes
UIX_OPPORTUNITYAMOUNTBRACKET_NAME_OPPORTUNITYBRACKETGROUPID NAME, OPPORTUNITYBRACKETGROUPID yes

Triggers

Trigger Name Description
TR_OPPORTUNITYAMOUNTBRACKET_INSERTUPDATE_CURRENCY
TR_OPPORTUNITYAMOUNTBRACKET_AUDIT_UPDATE
TR_OPPORTUNITYAMOUNTBRACKET_AUDIT_DELETE