hi all, i have a table A with the following fields date,x,y that i want to group by date and the sum of x and y table A: date x y --------------- 12-2-2012 4 5 12-2-2012 6 7 12-5-2012 3 4 12-5-2012 4 7 12-3-2012 2 2 table being grouped: 12-2-2012 10 12 12-5-2012 7 11 12-3-2012 2 2 so when i run the query :select date,sum(x),sum(y) from table A group by date i get the right results. But when i try to save the results into a new table (B) i get syntax errors (Incorrect syntax near the keyword 'as'.) create table B as (select date,sum(x),sum(y) from table A group by date); and i am running this on SQL Microsoft Studio 2008 What i am doing wrong here,anyone please?
... View more