/build/static/layout/Breadcrumb_cap_w.png

System Ticket Rule - mysql

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

Answers (3)

Posted by: CraigT 9 years ago
Orange Belt
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.
Posted by: brucegoose03 9 years ago
5th Degree Black Belt
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 
Posted by: WhitzEnd 9 years ago
7th Degree Black Belt
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. 

Comments:
  • 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. - KPack 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