rony_78 Posted October 16, 2014 Share Posted October 16, 2014 hello friends I have a table with three columns col1,col2 and col3. how do I add rows based on column1? col1|col2|col3| A | 2 | 4 | B | 6 | 8 | A | 10 |12| C | 14 |16| C | 3 | 2 | Output col1 col2 col3 ----|-------|-------| A | 12 | 16| B | 6 | 8| C | 17 |18| I am running the query in ms access from vb.net, can someone tell me why it does not work select col1, SUM(col2) as col2, SUM(col3) as col3 from table1 group by col1 Thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted October 16, 2014 Share Posted October 16, 2014 What happens when you run the query? Link to comment Share on other sites More sharing options...
rony_78 Posted October 16, 2014 Author Share Posted October 16, 2014 I get no runtime error Link to comment Share on other sites More sharing options...
justsomeguy Posted October 16, 2014 Share Posted October 16, 2014 So it works? Link to comment Share on other sites More sharing options...
sdfghjhrd Posted October 24, 2014 Share Posted October 24, 2014 (edited) Ialso have not runtime error.... thanx.... translation services uk Edited November 10, 2014 by sdfghjhrd Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now