| Primary Key | Field Type |
|---|---|
ID |
uniqueidentifier |
| 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) | ![]() |
CONVERT(bigint, TS) | Numeric representation of the timestamp. |
DISCOUNTGROUPDETAILAPPLICATIONCODE |
tinyint | Default = 3 | The type of discount: 0 - All discountable merchandise | |
DISCOUNTGROUPDETAILAPPLICATION |
nvarchar(28) (Computed) | ![]() |
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 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. |
| Index Name | Field(s) | Unique | Primary | Clustered |
|---|---|---|---|---|
IX_DISCOUNTGROUPDETAIL_DATEADDED |
DATEADDED | ![]() |
||
IX_DISCOUNTGROUPDETAIL_DATECHANGED |
DATECHANGED | |||
PK_DISCOUNTGROUPDETAIL |
ID | ![]() |
![]() |
| Trigger Name | Description |
|---|---|
TR_DISCOUNTGROUPDETAIL_AUDIT_UPDATE |
|
TR_DISCOUNTGROUPDETAIL_AUDIT_DELETE |
| Referenced by | Field |
|---|---|
DISCOUNTGROUPDETAILMERCHANDISEDEPARTMENT |
ID |
DISCOUNTGROUPDETAILMERCHANDISEITEM |
ID |
DISCOUNTGROUPDETAILPROGRAM |
ID |

ID
DISCOUNTEDITEM
TSLONG
DISCOUNTGROUPID
IX_DISCOUNTGROUPDETAIL_DATEADDED
IX_DISCOUNTGROUPDETAIL_DATECHANGED