sparks
2014-05-04 21:00:37 UTC
customernumber partnum quantity date
1111111 101 1 12/1/2013
2222222 105 1 12/1/2013
1111111 101 5 12/1/2013
1111111 105 1 12/1/2013
I need to get a new table with
customernumber part# quantity date
1111111 101 6 12/1/2013
1111111 105 1 12/1/2013
2222222 105 1 12/1/2013
this seems to work fine
SELECT CustomerOrders.customernumber, CustomerOrders.partnum,
Sum(CustomerOrders.quantity) AS SumOfquantity,
CustomerOrders.orderdate
FROM CustomerOrders
GROUP BY CustomerOrders.customernumber, CustomerOrders.partnum,
CustomerOrders.orderdate;
this is what I was using to write this to a new table
SELECT CustomerOrders.customernumber, CustomerOrders.partnum,
Sum(CustomerOrders.quantity) AS SumOfquantity,
CustomerOrders.orderdate INTO CombinedOrders
FROM CustomerOrders
GROUP BY CustomerOrders.customernumber, CustomerOrders.partnum,
CustomerOrders.orderdate;
this keeps telling me error on line 3
can someone tell me what I am doing wrong?
1111111 101 1 12/1/2013
2222222 105 1 12/1/2013
1111111 101 5 12/1/2013
1111111 105 1 12/1/2013
I need to get a new table with
customernumber part# quantity date
1111111 101 6 12/1/2013
1111111 105 1 12/1/2013
2222222 105 1 12/1/2013
this seems to work fine
SELECT CustomerOrders.customernumber, CustomerOrders.partnum,
Sum(CustomerOrders.quantity) AS SumOfquantity,
CustomerOrders.orderdate
FROM CustomerOrders
GROUP BY CustomerOrders.customernumber, CustomerOrders.partnum,
CustomerOrders.orderdate;
this is what I was using to write this to a new table
SELECT CustomerOrders.customernumber, CustomerOrders.partnum,
Sum(CustomerOrders.quantity) AS SumOfquantity,
CustomerOrders.orderdate INTO CombinedOrders
FROM CustomerOrders
GROUP BY CustomerOrders.customernumber, CustomerOrders.partnum,
CustomerOrders.orderdate;
this keeps telling me error on line 3
can someone tell me what I am doing wrong?