I have the following problem:
I have two tables. In the first (Baza) are:
ID
Mag_sifra
Int_Mag_Sifra
Naziv
Kolicina
Datum
In the second (Izdato) are:
ID
Mag_Sifra
Int_Mag_Sifra
Naziv
Izdato
Datum
Values Mag_Sifra, Naziv is the same in the both table. I made two queries. Query Baza and query Izdato. I want substract kolicina from first and Izdato from second. I get the following result:
14485 133 01 44 85 MANZETNA F-55/F 0 160 -160
14485 144 01 44 85 MANZETNA F-55/F 160 160 0
But i want this:
14485 133 01 44 85 MANZETNA F-55/F 0 0 0
14485 144 01 44 85 MANZETNA F-55/F 160 160 0
Where is 14485- Mag_Sifra, 133 01 44 85 and 144 01 44 85 - Int_Mag_Sifra, MANZETNA F-55/F - Naziv, first number is kolicina, second is izdato, and third is result.
Int_Mag_Šifra is the code of the place where the goods are in the warehouse. Its location. Mag_Šifra is the commodity code. Kolicina is the quantity of input goods, Izdato is the goods which have been issued.
I just have this two table and three query. Q3 = QueruBaza-CueryIzdato
I have two tables. In the first (Baza) are:
ID
Mag_sifra
Int_Mag_Sifra
Naziv
Kolicina
Datum
In the second (Izdato) are:
ID
Mag_Sifra
Int_Mag_Sifra
Naziv
Izdato
Datum
Values Mag_Sifra, Naziv is the same in the both table. I made two queries. Query Baza and query Izdato. I want substract kolicina from first and Izdato from second. I get the following result:
14485 133 01 44 85 MANZETNA F-55/F 0 160 -160
14485 144 01 44 85 MANZETNA F-55/F 160 160 0
But i want this:
14485 133 01 44 85 MANZETNA F-55/F 0 0 0
14485 144 01 44 85 MANZETNA F-55/F 160 160 0
Where is 14485- Mag_Sifra, 133 01 44 85 and 144 01 44 85 - Int_Mag_Sifra, MANZETNA F-55/F - Naziv, first number is kolicina, second is izdato, and third is result.
Int_Mag_Šifra is the code of the place where the goods are in the warehouse. Its location. Mag_Šifra is the commodity code. Kolicina is the quantity of input goods, Izdato is the goods which have been issued.
I just have this two table and three query. Q3 = QueruBaza-CueryIzdato
Attachments
Last edited: