-1

The query :

INSERT INTO tabticket

(name,creation,modified,modified_by,owner,docstatus,parent,parentfield,parent_type,idx,problem_status,commune,wiring_problem,actual_repair_visit_date,high_priority,vil

lage,solved_date,shs_id,customer_name,bottow_red_light,consumption,title,_comments,state,repair_comment,technician_required,plug_solar_plane,problem_description,teachn

ician_id,province,battery_level,_liked_by,planed_repair_visit_date,_assign,teachnician_name,phone,district,clean_panel,_user_tags,repairs_done,customer_id,product_type

,use_system,charge_led,opening_ticket-date,top_red_light,ticket_status,plug_solar_panel,bottom_red_light)
VALUES('ticket-00782','2016-09-01 010:20:07.634000','2016-09-01 10:30:07.634000','kalyan@kamworks.com','kalyan@kamworks.com',0,'NULL','NULL',NULL,0,'','ខុនរ៉ង Khon Rang- 

040104',' ','NULL',0,'កំពង់អួរ Kampong Uor - 04010410','NULL','SHS100 163','Som Sophat','NULL','0','NULL','NULL','0','NULL',' ',NULL,'no power','NULL','កំពង់ឆ្នាំង Kampong 

Chhnang',' ','NULL','NULL','NULL','NULL','097 5 005 554','បរិបូណ៌ Baribour - 0401','NULL',0,'040000049','SHS 100W -v2.0',' ',' ','2016-09-01','Pending repair visit',' ',' ');

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'high_priority,village,solved_date,shs_id,customer_name,bottow_red_light,consumpt' at line 1

closed as unclear what you're asking by RLF, Tom V, Paul White Sep 2 '16 at 6:43

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

1

Always use a SQL statement to check your statement, you don't need to post this if you have those tools.

First, high_priority is part of mysql select statement reserved word. If you use it as your column name, you must explicitly use quotation mark to prevent the query engine treat it as part of command.

Second, opening_ticket-DATE are going to give you error, after you fix high_priority with a quote. Again, without a quote, mysql query just treat the "-" mark as arithmetic operator, .e.g. opening_ticket (minus) DATE.

This is a terrible RBMS table structure, it is not normalised and doesn't standardise naming convention.

For example, I will use "priority" as the column name, limit the value to "low,medium,high" or "1,5,10" , this will allow assignment depends on written algorithm.

Not the answer you're looking for? Browse other questions tagged or ask your own question.