Hi, I don't recall modifying the SQL in the rule but it's generating an error.  Here's the error text and below that the query text.  Any insights would be appreciated.

mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' left join HD_TICKET_CHANGE_FIELD on HD_TICKET_CHAN' at line 13] in EXECUTE("SELECT COUNT(*) FROM (select distinct HD_TICKET.ID, HD_TICKET.OWNER_ID as OWNER_ID, HD_TICKET.ID as TICKNUM, HD_TICKET.TITLE, HD_STATUS.NAME AS STATUS_NAME, HD_STATUS.STATE as STATE, OWNER.USER_NAME as OWNER_NAME, OWNER.FULL_NAME as OWNER_FULLNAME, OWNER.EMAIL as OWNER_EMAIL, UPDATER.USER_NAME as UPDATERNAME, UPDATER.EMAIL as UPDATEREMAIL from (HD_TICKET, HD_STATUS) left join HD_TICKET_CHANGE on HD_TICKET_CHANGE.ID = left join HD_TICKET_CHANGE_FIELD on HD_TICKET_CHANGE_FIELD.HD_TICKET_CHANGE_ID = HD_TICKET_CHANGE.ID left join USER OWNER on OWNER.ID = HD_TICKET.OWNER_ID left join USER UPDATER on UPDATER.ID = HD_TICKET_CHANGE.USER_ID where HD_STATUS.ID = HD_TICKET.HD_STATUS_ID and HD_TICKET_CHANGE.HD_TICKET_ID= HD_TICKET.ID and HD_TICKET_CHANGE_FIELD.FIELD_CHANGED !='SATISFACTION_RATING' and HD_TICKET_CHANGE_FIELD.FIELD_CHANGED !='SATISFACTION_COMMENT' and HD_STATUS.ID in (13,3) and (UPDATER.ID <> OWNER.ID or OWNER.ID is NULL) and UPDATER.ID > 0 and HD_TICKET.HD_QUEUE_ID = '1') _ADODB_ALIAS_ LIMIT 1")

 

And here's the SQL query itself:

select distinct HD_TICKET.ID,
                           HD_TICKET.OWNER_ID as OWNER_ID,
                           HD_TICKET.ID as TICKNUM,
                           HD_TICKET.TITLE,
                           HD_STATUS.NAME AS STATUS_NAME,
                           HD_STATUS.STATE as STATE,
                           OWNER.USER_NAME as OWNER_NAME,
                           OWNER.FULL_NAME as OWNER_FULLNAME,
                           OWNER.EMAIL as OWNER_EMAIL,
                           UPDATER.USER_NAME as UPDATERNAME,
                           UPDATER.EMAIL as UPDATEREMAIL
                      from (HD_TICKET, HD_STATUS)
                 left join HD_TICKET_CHANGE on HD_TICKET_CHANGE.ID = <CHANGE_ID>
                 left join HD_TICKET_CHANGE_FIELD on HD_TICKET_CHANGE_FIELD.HD_TICKET_CHANGE_ID = HD_TICKET_CHANGE.ID
                 left join USER OWNER on OWNER.ID = HD_TICKET.OWNER_ID
                 left join USER UPDATER on UPDATER.ID = HD_TICKET_CHANGE.USER_ID
                     where HD_STATUS.ID = HD_TICKET.HD_STATUS_ID
                       and HD_TICKET_CHANGE.HD_TICKET_ID= HD_TICKET.ID
                       and HD_TICKET_CHANGE_FIELD.FIELD_CHANGED !='SATISFACTION_RATING'
                       and HD_TICKET_CHANGE_FIELD.FIELD_CHANGED !='SATISFACTION_COMMENT'
                       and HD_STATUS.ID in (13,3)
                       and (UPDATER.ID <> OWNER.ID or OWNER.ID is NULL)
                       and UPDATER.ID > 0

 

 

1 Comment   [ + ] Show Comment

Comments

  • Anyone know what "_ADODB_ALIAS_ LIMIT 1")" at the tail end of the error message refers to?
Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity

Share