Need some assistance because I don't really know anything about mysql.  Can anyone look at the error I am getting on a ticket rule and tell me/guide me to what needs to be done?  Thanks in advance for any help:)

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_CHANG' 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 (127,126,108,156) and (UPDATER.ID <> OWNER.ID or OWNER.ID is NULL) and UPDATER.ID > 0 and HD_TICKET.HD_QUEUE_ID = '21') _ADODB_ALIAS_ LIMIT 1")
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

3
Your issue is related to the join at "left join HD_TICKET_CHANGE on HD_TICKET_CHANGE.ID = ".  There is no value that is being compared and that is creating bad SQL.  The most likely cause of this is a typo in the TOKEN you are using in the SQL itself.  I'd recommend pasting the SQL from the ticket rule itself to identify the actual typo.
Answered 08/12/2015 by: CraigT
Orange Belt

Please log in to comment

Answers

0
Throw your query into something like MySQL workbench and connect workbench to your k1000. 

I think you've got an erroneus left join in there, but it's hard to tell. 

https://support.software.dell.com/k1000-systems-management-appliance/kb/114992 
Answered 08/12/2015 by: brucegoose03
Second Degree Black Belt

Please log in to comment
0
Can you tell us what you are trying to accomplish?  That may help us better answer your question.  If you are unfamiliar with MySQL, then our answer to our interpretation may not do anything to help you. 
Answered 08/12/2015 by: WhitzEnd
Seventh Degree Black Belt

  • It is a Customer Responded Rule that changes the status of a ticket to User Updated if the customer responds to a ticket when it is in a certain status.
Please log in to comment
Answer this question or Comment on this question for clarity

Share