Reporting with all comments
I have seen other posts online about including all comments in a report, but I can't seem to figure out how to place the proper syntax into the query.
Any help would be much appreciated
Danny
SELECT HD_TICKET_CHANGE.COMMENT AS HD_TICKET_CHANGE_COMMENT, HD_TICKET.CREATED AS HD_TICKET_CREATED, O.FULL_NAME AS OWNER_NAME, HD_STATUS.NAME AS STATUS, S.FULL_NAME AS SUBMITTER_NAME, HD_TICKET.ID AS HD_TICKET_ID, HD_TICKET.TITLE AS HD_TICKET_TITLE FROM HD_TICKET LEFT JOIN HD_TICKET_CHANGE ON (HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID) LEFT JOIN USER O ON (O.ID = HD_TICKET.OWNER_ID) JOIN HD_STATUS ON (HD_STATUS.ID = HD_TICKET.HD_STATUS_ID) LEFT JOIN USER S ON (S.ID = HD_TICKET.SUBMITTER_ID) WHERE (HD_TICKET.HD_QUEUE_ID = 1) AND ( (1 in (select 1 from HD_CATEGORY where HD_CATEGORY.ID = HD_TICKET.HD_CATEGORY_ID and HD_CATEGORY.NAME LIKE '%network%')) AND HD_TICKET.TITLE LIKE '%new hire%' AND (DATE(HD_TICKET.CREATED)> DATE_SUB(NOW(), INTERVAL 1 year) AND DATE(HD_TICKET.CREATED)<= NOW())) GROUP BY HD_TICKET.ID ORDER BY HD_TICKET.CREATED asc
Any help would be much appreciated
Danny
SELECT HD_TICKET_CHANGE.COMMENT AS HD_TICKET_CHANGE_COMMENT, HD_TICKET.CREATED AS HD_TICKET_CREATED, O.FULL_NAME AS OWNER_NAME, HD_STATUS.NAME AS STATUS, S.FULL_NAME AS SUBMITTER_NAME, HD_TICKET.ID AS HD_TICKET_ID, HD_TICKET.TITLE AS HD_TICKET_TITLE FROM HD_TICKET LEFT JOIN HD_TICKET_CHANGE ON (HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID) LEFT JOIN USER O ON (O.ID = HD_TICKET.OWNER_ID) JOIN HD_STATUS ON (HD_STATUS.ID = HD_TICKET.HD_STATUS_ID) LEFT JOIN USER S ON (S.ID = HD_TICKET.SUBMITTER_ID) WHERE (HD_TICKET.HD_QUEUE_ID = 1) AND ( (1 in (select 1 from HD_CATEGORY where HD_CATEGORY.ID = HD_TICKET.HD_CATEGORY_ID and HD_CATEGORY.NAME LIKE '%network%')) AND HD_TICKET.TITLE LIKE '%new hire%' AND (DATE(HD_TICKET.CREATED)> DATE_SUB(NOW(), INTERVAL 1 year) AND DATE(HD_TICKET.CREATED)<= NOW())) GROUP BY HD_TICKET.ID ORDER BY HD_TICKET.CREATED asc
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
GillySpy
13 years ago
Does this help:
http://www.kace.com/support/kb/index.php?action=artikel&id=954
If not what is it missing? Can you mock up an example of what you want?
http://www.kace.com/support/kb/index.php?action=artikel&id=954
If not what is it missing? Can you mock up an example of what you want?
Posted by:
dannyv
13 years ago
Posted by:
dannyv
13 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.