Home Forums SQL Server 2005 SQL Server Newbies SUM OF TWO COLUMNS FROM TWO DIFFERENT TABLES IN THE SAME QUERY RE: SUM OF TWO COLUMNS FROM TWO DIFFERENT TABLES IN THE SAME QUERY

  • For instance, you have to remove the RAM.Capacity and Disk.DiskSize from your GROUP BY. You might also need to aggregate the values before joining the tables. This can be done with a subquery or a CTE.

    On a different topic:

    Are you aware of the issues you face with integer division?

    Why do you use 1024 for RAM and 1000 for disk size?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2