Help with sql statement

[Closed]
Report
Posts
1
Registration date
Wednesday August 29, 2012
Status
Member
Last seen
September 25, 2012
-
Posts
4233
Registration date
Thursday August 19, 2010
Status
Moderator
Last seen
August 3, 2016
-
Hello,

Please help me with this

I want to list all tables in ms access database and sum of a specific column (I have a column name "total" in all tables).I found sql statement that returns list of table names but how do I get the sum of column "total" from all tables and place next to corespoding table?

I have tried so far

 select table_name from information _schema.columns where column_name="total"


any bit of info would be helpful



1 reply

Posts
4233
Registration date
Thursday August 19, 2010
Status
Moderator
Last seen
August 3, 2016

Greetings,

You can use this syntax for getting the sum of a specifiq table:
   SELECT SUM(colum_name) AS sum FROM table_name


This gonna return the sum of the column.

Good Luck!
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month