Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

MySQL query problem

$
0
0
Hi,guys.
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?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>