Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 STARTTIME UDT_HOURMINUTE   Default = '' The start time for this itinerary item.
 ENDTIME UDT_HOURMINUTE   Default = '' The end time for this itinerary item.
 NAME nvarchar(100)   Default = '' The name for this itinerary item.
 NOTES nvarchar(500)   Default = '' The notes for this itinerary item.
 BLOCKEVENT bit   Default = 0 Indicates whether to block event from other groups.
 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.
 STARTDATE date   The start date for an itinerary item.
 ENDDATE date   The end date for an itinerary item.
 ITEMTYPECODE tinyint   Default = 0 The type of itinerary item
 INVALIDREASONCODE tinyint   Default = 0 For unscheduled items, the reason the item is invalid
 ITEMTYPE nvarchar(23) (Computed) CASE [ITEMTYPECODE] WHEN 0 THEN N'Scheduled event' WHEN 1 THEN N'Daily admission program' WHEN 2 THEN N'Custom item' WHEN 3 THEN N'Unscheduled item' END Provides a translation for the 'ITEMTYPECODE' field.
 INVALIDREASON nvarchar(72) (Computed) CASE [INVALIDREASONCODE] WHEN 0 THEN N'Not invalid' WHEN 1 THEN N'Event or program is inactive' WHEN 2 THEN N'Event does not have the capacity for this itinerary' WHEN 3 THEN N'Event is blocked by another itinerary' WHEN 4 THEN N'Event is missing a price type needed by this itinerary' WHEN 5 THEN N'Event not scheduled on this date and time' WHEN 6 THEN N'Daily admission program is inactive' WHEN 8 THEN N'Event is not on sale' WHEN 9 THEN N'Daily admission program is not on sale' WHEN 10 THEN N'Creates resource or location conflict with other event or itinerary item' WHEN 11 THEN N'Daily admission program is missing a price type needed by this itinerary' END Provides a translation for the 'INVALIDREASONCODE' field.
 STARTDATETIME datetime (Computed) dateadd(minute, convert(tinyint, substring(STARTTIME, 3, 2)), dateadd(hour, convert(tinyint, substring(STARTTIME, 1, 2)), convert(datetime, STARTDATE)))
 ENDDATETIME datetime (Computed) dateadd(minute, convert(tinyint, substring(ENDTIME, 3, 2)), dateadd(hour, convert(tinyint, substring(ENDTIME, 1, 2)), convert(datetime, ENDDATE)))

Foreign Key Field Type Null Notes Description
 PROGRAMID uniqueidentifier PROGRAM.ID The program that is linked to a scheduled or unscheduled Daily admission program itinerary item.
 EVENTID uniqueidentifier EVENT.ID The event that is linked to a scheduled or unscheduled Daily admission program itinerary item.
 ITINERARYID uniqueidentifier   ITINERARY.ID The itinerary in which this itinerary item is linked.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 EVENTLOCATIONID uniqueidentifier EVENTLOCATION.ID The location for a custom item.

Index Name Field(s) Unique Primary Clustered
 IX_ITINERARYITEM_DATEADDED DATEADDED    
 IX_ITINERARYITEM_DATECHANGED DATECHANGED      
 IX_ITINERARYITEM_EVENTID EVENTID      
 IX_ITINERARYITEM_EVENTLOCATIONID EVENTLOCATIONID      
 IX_ITINERARYITEM_ITINERARYID ITINERARYID      
 IX_ITINERARYITEM_PROGRAMID PROGRAMID      
 PK_ITINERARYITEM ID  

Trigger Name Description
 TR_ITINERARYITEM_INSERTUPDATE_ITINERARYSTAFFRESOURCEUPDATE
 TR_ITINERARYITEM_DELETE_ITINERARYSTAFFRESOURCEUPDATE
 TR_ITINERARYITEM_INSERT_RESOURCE_UPDATE
 TR_ITINERARYITEM_DELETE_RESOURCE_UPDATE
 TR_ITINERARYITEM_UPDATE_ITINERARYITEMSTAFFRESOURCEUPDATE
 TR_ITINERARYITEM_AUDIT_UPDATE
 TR_ITINERARYITEM_AUDIT_DELETE

Referenced by Field
 ITINERARYITEMLOCATION ID
 ITINERARYITEMRESOURCE ITINERARYITEMID
 ITINERARYITEMSTAFFRESOURCE ITINERARYITEMID

Entity-Relationship diagram of this table