MKTMATERIAL
Stores information pertaining to a marketing material.
Primary Key
| Primary Key |
Field Type |
| ID |
uniqueidentifier |
Fields
| Field |
Field Type |
Null |
Notes |
Description |
| NAME |
nvarchar(100) |
|
Default = '' |
A name for the material. |
| DESCRIPTION |
nvarchar(255) |
|
Default = '' |
A description of the material. |
| COST |
money |
|
Default = 0 |
The cost associated with the material. |
| COSTDISTRIBUTIONMETHODCODE |
tinyint |
|
Default = 0 |
The method to be used to apply the material's base cost to a marketing effort. |
| 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. |
| ORGANIZATIONCOST |
money |
|
Default = 0 |
The amount of the cost in organization currency. |
| COSTDISTRIBUTIONMETHOD |
nvarchar(39) (Computed) |
yes |
CASE [COSTDISTRIBUTIONMETHODCODE] WHEN 0 THEN N'Per piece' WHEN 1 THEN N'Per response' WHEN 2 THEN N'Per marketing effort' WHEN 4 THEN N'Per thousand' WHEN 3 THEN N'Do not include in marketing effort cost' END |
Provides a translation for the 'COSTDISTRIBUTIONMETHODCODE' field. |
Foreign Keys
| Foreign Key |
Field Type |
Null |
Notes |
Description |
| SITEID |
uniqueidentifier |
yes |
SITE.ID
|
The site to which the material belongs. |
| MATERIALTYPECODEID |
uniqueidentifier |
yes |
MKTMATERIALTYPECODE.ID
|
The type of the material. |
| VENDORID |
uniqueidentifier |
yes |
VENDOR.ID
|
The vendor associated with this material. |
| ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
| CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
| BASECURRENCYID |
uniqueidentifier |
yes |
CURRENCY.ID
|
The base currency associated with this material. |
| CURRENCYEXCHANGERATEID |
uniqueidentifier |
yes |
CURRENCYEXCHANGERATE.ID
|
The exchange rate used to convert from amount to organization amount. |
Indexes
| Index Name |
Fields |
Unique |
Primary |
Clustered |
| IX_MKTMATERIAL_BASECURRENCYID |
BASECURRENCYID |
|
|
|
| IX_MKTMATERIAL_CURRENCYEXCHANGERATEID |
CURRENCYEXCHANGERATEID |
|
|
|
| IX_MKTMATERIAL_DATEADDED |
DATEADDED |
|
|
yes |
| IX_MKTMATERIAL_DATECHANGED |
DATECHANGED |
|
|
|
| IX_MKTMATERIAL_SITEID |
SITEID |
|
|
|
| IX_MKTMATERIAL_VENDORID |
VENDORID |
|
|
|
| PK_MKTMATERIAL |
ID |
yes |
yes |
|
| UC_MKTMATERIAL_NAME |
NAME |
yes |
|
|
Triggers
Referenced by