Hello,
I have a query in which I subtract values from two tables.
Table magacin_CLT_ulaz and magacin_CLT_izlaz
The first table is the entry of goods into the warehouse, the second is the exit of goods.
These are building elements and common values can be length, width, height. Of course, the quantity is different.
In the query I tried to subtract the quantities of goods that came in and the quantity of goods that came out.
I get nothing as a result. Where am I wrong?
I have a query in which I subtract values from two tables.
Table magacin_CLT_ulaz and magacin_CLT_izlaz
The first table is the entry of goods into the warehouse, the second is the exit of goods.
These are building elements and common values can be length, width, height. Of course, the quantity is different.
In the query I tried to subtract the quantities of goods that came in and the quantity of goods that came out.
SQL:
SELECT magacin_CLT_ulaz.kolicina AS A, magacin_CLT_izlaz.kolicina AS B, [A]-[B] AS Expr1
FROM magacin_CLT_ulaz INNER JOIN magacin_CLT_izlaz ON (magacin_CLT_ulaz.debljina = magacin_CLT_izlaz.debljina) AND (magacin_CLT_ulaz.sirina = magacin_CLT_izlaz.sirina) AND (magacin_CLT_ulaz.duzina = magacin_CLT_izlaz.duzina);
I get nothing as a result. Where am I wrong?