MKTSEGMENTLIST

This table contains segment information specific to list segments.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
TYPECODE tinyint Default = 0 The type of the list segment.
STATUSCODE tinyint Default = 0 The status of the finder file.
ORDERDATE datetime yes The date the list was ordered.
EXPIRATIONDATE datetime yes The date the list expires.
NUMBEROFCONTACTS smallint Default = ((1)) The number of times each person in the list may be contacted.
FILENAME nvarchar(255) Default = '' The original file name for the imported list file.
RENTALQUANTITY int Default = 0 The number of records from the parent list in the segment that were rented.
RENTALCOSTADJUSTMENT money Default = 0 The cost adjustment of the rented records in the segment.
RENTALCOSTBASISCODE tinyint Default = 1 The basis on which the cost of the rented records in the segment should be calculated.
EXCHANGEQUANTITY int Default = 0 The number of records from the parent list in the segment that were received in an exchange.
EXCHANGECOSTADJUSTMENT money Default = 0 The cost adjustment of the records received via exchange in the segment.
EXCHANGECOSTBASISCODE tinyint Default = 1 The basis on which the cost of the exchanged records in the segment should be calculated.
TOTALRECORDCOUNT int (Computed) yes [RENTALQUANTITY] + [EXCHANGEQUANTITY] The total number of records in the original list.
DUPLICATERECORDCOUNT int Default = 0 The total number of duplicate records found in the original list.
RECEIVEDVIACODE int (Computed) yes case when [EXCHANGEQUANTITY] = 0 and [RENTALQUANTITY] > 0 then 1 when [EXCHANGEQUANTITY] > 0 and [RENTALQUANTITY] = 0 then 2 when [EXCHANGEQUANTITY] > 0 and [RENTALQUANTITY] > 0 then 3 end Indicates whether the records in the segment were rented or were received in an exchange of lists, or both.
RECEIVEDVIA varchar(8) (Computed) yes case when [EXCHANGEQUANTITY] = 0 and [RENTALQUANTITY] > 0 then 'Rental' when [EXCHANGEQUANTITY] > 0 and [RENTALQUANTITY] = 0 then 'Exchange' when [EXCHANGEQUANTITY] > 0 and [RENTALQUANTITY] > 0 then 'Both' end Indicates whether the records in the segment were rented or were received in an exchange of lists, or both.
MINIMUMDATAID uniqueidentifier yes The minimum record ID in this finder file.
MAXIMUMDATAID uniqueidentifier yes The maximum record ID in this finder file.
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.
TYPE nvarchar(14) (Computed) yes CASE [TYPECODE] WHEN 0 THEN N'Imported' WHEN 1 THEN N'Vendor managed' END Provides a translation for the 'TYPECODE' field.
STATUS nvarchar(14) (Computed) yes CASE [STATUSCODE] WHEN 0 THEN N'Pending import' WHEN 1 THEN N'Importing' WHEN 3 THEN N'Active' WHEN 4 THEN N'Historical' WHEN 5 THEN N'Purged' END Provides a translation for the 'STATUSCODE' field.
RENTALCOSTBASIS nvarchar(12) (Computed) yes CASE [RENTALCOSTBASISCODE] WHEN 1 THEN N'Per thousand' WHEN 2 THEN N'Flat' END Provides a translation for the 'RENTALCOSTBASISCODE' field.
EXCHANGECOSTBASIS nvarchar(12) (Computed) yes CASE [EXCHANGECOSTBASISCODE] WHEN 1 THEN N'Per thousand' WHEN 2 THEN N'Flat' END Provides a translation for the 'EXCHANGECOSTBASISCODE' field.
ORGANIZATIONRENTALCOSTADJUSTMENT money Default = 0 The cost adjustment of the rented records in the segment in the organization currency.
ORGANIZATIONEXCHANGECOSTADJUSTMENT money Default = 0 The cost adjustment of the records received via exchange in the segment in the organization currency.

Foreign Keys

Foreign Key Field Type Null Notes Description
SEGMENTID uniqueidentifier MKTSEGMENT.ID Foreign key to MKTSEGMENT.
LISTID uniqueidentifier MKTLIST.ID Foreign key to MKTLIST. The list from which this segment was created.
LISTLAYOUTID uniqueidentifier yes MKTLISTLAYOUT.ID Foreign key to MKTLISTLAYOUT. The list layout used to import records for this segment.
QUERYVIEWCATALOGID uniqueidentifier yes QUERYVIEWCATALOG.ID Foreign key to QUERYVIEWCATALOG. The query view associated with the list that provides all non-duplicate imported list records.
CONSOLIDATEDQUERYVIEWID uniqueidentifier yes QUERYVIEWCATALOG.ID Foreign key to QUERYVIEWCATALOG.
IDSETRECORDTYPEID uniqueidentifier yes RECORDTYPE.ID Foreign key to RECORDTYPE. The record type of both the standard IDSet and the duplicate IDSet.
STANDARDIDSETID uniqueidentifier yes IDSETREGISTER.ID Foreign key to IDSETREGISTER. The IDSet that contains all non-duplicate list records.
DUPLICATEIDSETID uniqueidentifier yes IDSETREGISTER.ID Foreign key to IDSETREGISTER. The IDSet that contains all duplicate list records.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
PARENTSEGMENTID uniqueidentifier yes MKTSEGMENT.ID FK to MKTSEGMENT
BASECURRENCYID uniqueidentifier yes CURRENCY.ID The base currency associated with this list segment.
CURRENCYEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to convert from amount to organization amount.

Indexes

Index Name Fields Unique Primary Clustered
IX_MKTSEGMENTLIST_BASECURRENCYID BASECURRENCYID
IX_MKTSEGMENTLIST_CONSOLIDATEDQUERYVIEWID CONSOLIDATEDQUERYVIEWID
IX_MKTSEGMENTLIST_CURRENCYEXCHANGERATEID CURRENCYEXCHANGERATEID
IX_MKTSEGMENTLIST_DATEADDED DATEADDED yes
IX_MKTSEGMENTLIST_DATECHANGED DATECHANGED
IX_MKTSEGMENTLIST_IDSETRECORDTYPEID IDSETRECORDTYPEID
IX_MKTSEGMENTLIST_LISTID LISTID
IX_MKTSEGMENTLIST_LISTLAYOUTID LISTLAYOUTID
IX_MKTSEGMENTLIST_PARENTSEGMENTID PARENTSEGMENTID
IX_MKTSEGMENTLIST_SEGMENTID SEGMENTID
PK_MKTSEGMENTLIST ID yes yes
UIX_MKTSEGMENTLIST_DUPLICATEIDSETID DUPLICATEIDSETID yes
UIX_MKTSEGMENTLIST_QUERYVIEWCATALOGID QUERYVIEWCATALOGID yes
UIX_MKTSEGMENTLIST_STANDARDIDSETID STANDARDIDSETID yes

Triggers

Trigger Name Description
TR_MKTSEGMENTLIST_AUDIT_UPDATE
TR_MKTSEGMENTLIST_AUDIT_DELETE
TR_MKTSEGMENTLIST_IU_ORGANIZATIONAMOUNTS

Referenced by

Referenced by Field
MKTSEGMENT CURRENTSEGMENTLISTID
MKTSEGMENTATIONSEGMENTLIST SEGMENTLISTID
MKTSEGMENTLISTDATA SEGMENTLISTID
MKTSEGMENTLISTDEDUPEPROCESS SEGMENTLISTID
MKTSEGMENTLISTHISTORICAL ID
MKTSEGMENTLISTIMPORTPROCESS SEGMENTLISTID