Link to home
Start Free TrialLog in
Avatar of yahshuah
yahshuah

asked on

subtract amount of two fields

subtract amount of two fields

[tblPurchaseOrder.Amount]*.12 as VAT, [tblPurchaseorder.Amount] - [Vat] as exVat, tblPurchaseorder.Amount

but exVat is = tlbpurchase.Amount it doesnt subtract tblpurchaseorder.Amount*0.12

whole sql querry

[tblPurchaseOrder.Amount]*.12 as VAT, [tblPurchaseorder.Amount] - [Vat] as exVat, tblPurchaseorder.Amount

SELECT tblPurchaseOrder.ProductID, tblPurchaseOrder.Description, tblPurchaseOrder.Quantity, tblPurchaseOrder.Unit, tblPurchaseOrder.UnitPrice, tblPurchaseOrder.PreparedBy, tblPurchaseOrder.ApprovedBy, tblPurchaseOrder.PurchaseOrderNo, tblPurchaseOrder.Status, [tblPurchaseOrder.Amount]*.12 as VAT, [tblPurchaseorder.Amount] - [Vat] as exVat, tblPurchaseorder.Amount
FROM tblPurchaseOrder INNER JOIN tblSupplier ON tblPurchaseOrder.SupplierID = tblSupplier.SupplierID
WHERE (((tblPurchaseOrder.Status)="Approved")) and  (((tblPurchaseOrder.quantity)<>0))   ;
Avatar of Aneesh
Aneesh
Flag of Canada image

[tblPurchaseOrder.Amount]*.12 as VAT, [tblPurchaseorder.Amount] -([tblPurchaseOrder.Amount]*.12)  as exVat, tblPurchaseorder.Amount
SOLUTION
Avatar of jrm213jrm213
jrm213jrm213
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial