If I have like Select SUM(amount) AS TotalA from tableA
and Select SUM(amountB) AS TotalB from tableB,
is there a way i can create a query that adds or subtract these two values even if the tables are not linked by a relationship??
Any help is greatly appreciated..
P.S I am trying to find a way to get sort of a bank balance, like all my credits and debit are stored in different tables and i want to create a query that gets the balance.
2007-05-01
22:10:35
·
3 answers
·
asked by
Phugz
1
in
Computers & Internet
➔ Programming & Design
The problem with the first one is that the amount or total is just mathematically incorrect, the numbers are way too big, like in the millions, as much as i wish that's my balance, it's not, : )
The second answer gives me the right amount but it retrieves multiple rows, like the number of rows in the first table times by of added with the the number of rows in the second table.
I really appreciate the help, it's really close..
2007-05-02
16:12:10 ·
update #1