Stephen Weiler Posted December 29, 2021 Posted December 29, 2021 I've developed a Direct SQL query that gives me what I need, but I can't find a way to use this / replicate this in Reports / in some method others can run. Can we use SQL functions in Reports? My Direct SQL is below. The measures I'm looking for are in bold font. Can I get these same results using Reports? select h_pk_reference TicketNumber, h_summary Summary, h_fk_priorityname priority, h_ownername owner, IF(h_ownername = h_lastmodifiedusername, 'Yes','No') LastUpdatedByOwner, h_datelogged LogDate, h_datelastmodified lastmodified, TIMESTAMPDIFF(HOUR,h_datelastmodified,CURRENT_TIMESTAMP()) AS HoursSinceUpdate, ROUND(TIMESTAMPDIFF(HOUR,h_datelastmodified, CURRENT_TIMESTAMP())/24,0) AS DaysSinceUpdate, h_lastmodifiedusername lastmodifiedby, h_status status from h_itsm_requests where h_status not in('status.closed','status.resolved','status.cancelled') limit 1000
Victor Posted December 30, 2021 Posted December 30, 2021 13 hours ago, Stephen Weiler said: Can we use SQL functions in Reports? @Stephen Weiler not possible I'm afraid. You can look into widgets (where custom SQL queries are possible) if these would be a suitable alternative.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now