Search code examples
mysqlinsert-into

MYSQL INSERT INTO ERROR


i keep getting 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 '."LTTA3101","1","03-JAN-07"), ("SK3127","LTCPF502","5","03-JAN-07")' at line 17

INSERT INTO sales
(cust_id,prod_id,quanitity,date_of_sale)
values
("MH3367
","DTHP7710","1","01-OCT-06"),
("GM4632","DTCP2109","4","08-OCT-06"),
("GM2581","LTTA3101","1","10-OCT-06"),
("GM4632","LTCPF502","2","28-0CT-06"),
("KM4673","LTCPC505","4","04-NOV-06"),
("MH3367","LTPBMZ36","3","22-NOV-06
"),
("KS2169","LTTA0338","4","14-DEC-06"),
("AS3485","DJHP1280","5","16-DEC-06"),
("KM4637","DJEPR180","5","18-DEC-06"),
("GM2581","A1HPF380","8","19-DEC-06"),
("GM4632","A1LX5470","9","22-DEC-06"),
("AS3485","DTHP7710","1","23-DEC-06"),
("SK3127","DTCP2109","5","24-DEC-06"),
("AS3485"."LTTA3101","1","03-JAN-07"),
("SK3127","LTCPF502","5","03-JAN-07");

can anyone help?

Thanks..


Solution

  • INSERT INTO sales
    (cust_id,prod_id,qty,date_of_sale)
    values
    ("MH3367","DTHP7710","1","2006-10-01"),
    ("GM4632","DTCP2109","4","2006-10-02"),
    ("GM2581","LTTA3101","1","2006-10-03"),
    ("GM4632","LTCPF502","2","2006-10-04"),
    ("KM4673","LTCPC505","4","2006-11-04"),
    ("MH3367","LTPBMZ36","3","2006-11-22"),
    ("KS2169","LTTA0338","4","2006-12-09"),
    ("AS3485","DJHP1280","5","2006-12-16"),
    ("KM4637","DJEPR180","5","2006-12-18"),
    ("GM2581","A1HPF380","8","2006-12-19"),
    ("GM4632","A1LX5470","9","2006-12-20"),
    ("AS3485","DTHP7710","1","2006-12-21"),
    ("SK3127","DTCP2109","5","2006-12-30"),
    ("AS3485","LTTA3101","1","2007-01-07"),
    ("SK3127","LTCPF502","5","2007-01-07");