DISCOUNTGROUPDETAIL
Stores qualifying and discounted item information.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
DISCOUNTEDITEM |
bit |
|
Default = 1 |
Indicates if the item is discounted, otherwise it is a qualifying item. |
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. |
DISCOUNTGROUPDETAILAPPLICATIONCODE |
tinyint |
|
Default = 3 |
The type of discount: 0 - All discountable merchandise |
DISCOUNTGROUPDETAILAPPLICATION |
nvarchar(28) (Computed) |
yes |
CASE [DISCOUNTGROUPDETAILAPPLICATIONCODE] WHEN 0 THEN N'All discountable merchandise' WHEN 1 THEN N'Merchandise department' WHEN 2 THEN N'Merchandise' WHEN 3 THEN N'Program' WHEN 4 THEN N'Any merchandise' WHEN 5 THEN N'Any discountable item' WHEN 6 THEN N'Any discountable department' END |
Provides a translation for the 'DISCOUNTGROUPDETAILAPPLICATIONCODE' field. |
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
DISCOUNTGROUPID |
uniqueidentifier |
|
DISCOUNTGROUP.ID
|
The ID of the Discount Group the Detail Information belongs to. |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_DISCOUNTGROUPDETAIL_DATEADDED |
DATEADDED |
|
|
yes |
IX_DISCOUNTGROUPDETAIL_DATECHANGED |
DATECHANGED |
|
|
|
PK_DISCOUNTGROUPDETAIL |
ID |
yes |
yes |
|
Triggers
Referenced by