Quantcast
Channel: Latest Questions by Philleke
Viewing all articles
Browse latest Browse all 4

SUM(Total) of multiple select SUM statements

$
0
0
Hello I'm a newbie in SQL and this is what we need: in multiple db's (DB1, DB2, DB3) we have a table (same tablename in all DB's: table1) with a column named Size. We need to retrieve the Total size in each db and the Total of all db's. Here is how it should look like: DBName Size ----------------------------------------------------- DB1 SUM(Size) AS Size from [db1].[dbo].[table1] DB2 SUM(Size) AS Size from [db2].[dbo].[table1] DB3 SUM(Size) AS Size from [db3].[dbo].[table1] ----------------------------------------------------- Total: SUM of all the above Could anyone help me pls. Thnx Philleke

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images