/build/static/layout/Breadcrumb_cap_w.png

Add Due Date Column to an existing report

I am trying to add the "Due Date" column to an existing report but cannot figure out the coding.  Can you please point me in the right direction?  I am using the following codes for my report:

-------------------------------------------------------------------------------------------------------------
SELECT HD_TICKET.ID,
    HD_TICKET.TITLE,
    HD_CATEGORY.NAME AS CATEGORY,
    HD_TICKET.TIME_OPENED,
    HD_TICKET.TIME_CLOSED,
    HD_TICKET.DUE_DATE,
    O.FULL_NAME AS OWNER_NAME,
    S.FULL_NAME AS SUBMITTER_NAME,
    HD_STATUS.NAME AS STATUS,
    HD_PRIORITY.NAME AS PRIORITY,
    HD_TICKET.CUSTOM_FIELD_VALUE2 
FROM HD_TICKET 
JOIN HD_CATEGORY ON (HD_CATEGORY.ID = HD_TICKET.HD_CATEGORY_ID)
LEFT JOIN USER O ON (O.ID = HD_TICKET.OWNER_ID)
LEFT JOIN USER S ON (S.ID = HD_TICKET.SUBMITTER_ID)
JOIN HD_STATUS ON (HD_STATUS.ID = HD_TICKET.HD_STATUS_ID)
JOIN HD_DUE_DATE  ON (HD_STATUS.ID = HD_TICKET.DUE_DATE_ID)
JOIN HD_PRIORITY ON (HD_PRIORITY.ID = HD_TICKET.HD_PRIORITY_ID)
WHERE (HD_TICKET.HD_QUEUE_ID != 5) AND ((TIMESTAMP(HD_TICKET.TIME_CLOSED) <= NOW() AND TIMESTAMP(HD_TICKET.TIME_CLOSED) > DATE_SUB(NOW(),INTERVAL 30 DAY))) AND (HD_STATUS.NAME = 'Closed')  ORDER BY CATEGORY
-------------------------------------------------------------------------------------------------------------

Thanks in advance!

0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: aragorn.2003 9 years ago
Red Belt
0
Just remove this line.
JOIN HD_DUE_DATE  ON (HD_STATUS.ID = HD_TICKET.DUE_DATE_ID)
cause the column DUE_DATE is a column of the HD_TICKET table.

fq2Fyu.png

Comments:
  • Thanks Aragorn! - TXgroup 9 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ