K1000 Ticket Report: Tickets that were raised for a months period
(1) tickets raised in a particular Queue for a specific Category
(2) both active and archived
2 Comments
[ + ] Show comments
Answers (0)
Please log in to answer
Be the first to answer this question
SELECT HD_TICKET.ID,
HD_CATEGORY.NAME AS CATEGORY,
Q.NAME AS QUEUE_NAME
FROM HD_TICKET
JOIN HD_CATEGORY ON (HD_CATEGORY.ID = HD_TICKET.HD_CATEGORY_ID)
JOIN HD_QUEUE Q ON Q.ID = HD_TICKET.HD_QUEUE_ID
WHERE (HD_TICKET.HD_QUEUE_ID = 1)
AND (HD_CATEGORY.NAME LIKE 'Software%')
UNION ALL
SELECT HD_ARCHIVE_TICKET.ID,
HD_CATEGORY.NAME AS CATEGORY,
Q.NAME AS QUEUE_NAME
FROM HD_ARCHIVE_TICKET
JOIN HD_CATEGORY ON (HD_CATEGORY.ID = HD_ARCHIVE_TICKET.HD_CATEGORY_ID)
JOIN HD_QUEUE Q ON Q.ID = HD_ARCHIVE_TICKET.HD_QUEUE_ID
WHERE (HD_ARCHIVE_TICKET.HD_QUEUE_ID = 1)
AND (HD_CATEGORY.NAME LIKE 'Software%') - Druis 6 years ago
i used this:
SELECT HD_TICKET.ID,
HD_CATEGORY.NAME AS CATEGORY,
Q.NAME AS QUEUE_NAME
FROM HD_TICKET
JOIN HD_CATEGORY ON (HD_CATEGORY.ID = HD_TICKET.HD_CATEGORY_ID)
JOIN HD_QUEUE Q ON Q.ID = HD_TICKET.HD_QUEUE_ID
WHERE (HD_TICKET.HD_QUEUE_ID LIKE 'General%')
AND (HD_CATEGORY.NAME LIKE 'Software%')
UNION ALL
SELECT HD_ARCHIVE_TICKET.ID,
HD_CATEGORY.NAME AS CATEGORY,
Q.NAME AS QUEUE_NAME
FROM HD_ARCHIVE_TICKET
JOIN HD_CATEGORY ON (HD_CATEGORY.ID = HD_ARCHIVE_TICKET.HD_CATEGORY_ID)
JOIN HD_QUEUE Q ON Q.ID = HD_ARCHIVE_TICKET.HD_QUEUE_ID
WHERE (HD_ARCHIVE_TICKET.HD_QUEUE_ID LIKE 'General%')
AND (HD_CATEGORY.NAME LIKE 'Software%') - Jklass 6 years ago
You also need to change the HD_CATEGORY.NAME LIKE 'Software%' to match the category that you want your report to reflect. Make sure you change it in both places. - chucksteel 6 years ago