The Tickets Table contains each ticket record in the system. This table also contains "backing" records for ticket templates, which should generally be filtered out of queries.
Query Example
You may use the following example as a starter template.
Please note that the below example does not cover every possible column to select, join, filter, or order by. You may need to modify this query to suit your needs. Refer to the related Getting Started Guide for Database Queries article for how to identify your @BEIDInt or @BEID values (tenant ID).
Select
Top 10
tck.Tck_ID,
tck.Tck_AppID,
tck.Tck_Title,
tck.Tck_Description,
tck.Tck_TypeID,
tck.Tck_AccountID,
tck.Tck_StatusID,
tck.Tck_FormID,
tck.Tck_ServiceID,
tck.Tck_ServiceOfferingID,
/* Requestor UID */
tck.Tck_ContactUID,
tck.Tck_CreatedByUID,
tck.Tck_CreatedDate,
tck.Tck_LastModifiedByUID,
tck.Tck_LastModifiedDate,
tck.Tck_ClosedByUID,
tck.Tck_ClosedDate
/* Add or change selected columns as necessary. */
From
dbo.Tickets tck With (NOLOCK)
Where
tck.Tck_BEIDInt = @BEIDInt
/* Uncomment the below line to filter on a specific ticketing application ID */
-- And tck.Tck_AppID = YOUR_TICKET_APPLICATION_ID_HERE
/* Filter out ticket templates */
And tck.Tck_ComponentID <> 36