Hi,guys.
I got an error when I'm using this sql query.
this is the error message.
"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 '1) select sum(quantity) FROM con_sales WHERE (con_sales.brandid='626' AND con_sa' at line 1"
Can someone point out where is my problem?
I got an error when I'm using this sql query.
INSERT INTO monthly_sales(1) SELECT SUM(quantity) FROM con_sales WHERE (con_sales.brandid='626' AND con_sales.artno = '100G' AND DAY(con_sales.receiptdate) = '06' AND MONTH(con_sales.receiptdate) = '09')
this is the error message.
"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 '1) select sum(quantity) FROM con_sales WHERE (con_sales.brandid='626' AND con_sa' at line 1"
Can someone point out where is my problem?