hi
Please can someone help me....
i have created a query and evertime i try to run it, i am getting a Type Mismatch error....
i have four tables containing the folowing data:
Company_Details: company_ID, Company_Name, Contact_Name, Address, Discount (in percent).
Car_details: Registration_Number, Tyre_type, Company ID.
Price: Type_Type, Price_ex_vat, Manufacturers_code.
Transaction: Invioce_Number, Date, Registration_Number, Number_of_Types_fitted.
what i am trying to do is to create a query which would display the details of all transactions together with the price (excluding vat), the subtotal (price_ex_vat * number_of_tyres_fitted), price after discount (subtotal - discount)(discount from the company_details table), and finally the total price includin VAT.
i have manage to create this query so far....but as soon as i display the company details table to calculate the discount i get the error...
SELECT DISTINCT Transaction.Invoice_Number, Transaction.Number_of_Tyres_Fitted, Price.Price_Ex_VAT, [Number_of_Tyres_Fitted]*[Price_Ex_VAT] AS Subtotal, [Subtotal]*1.175 AS Total
FROM Price INNER JOIN (Car_Details INNER JOIN [Transaction] ON Car_Details.Registration_Number = Transaction.Registration_Number) ON Price.Tyre_Type = Car_Details.Tyre_Type;
the above query is working fine....its just the discount section that i cant get to work.
please can someone help me out here.....
thanks
kay..
------
eXtacy
Please can someone help me....
i have created a query and evertime i try to run it, i am getting a Type Mismatch error....
i have four tables containing the folowing data:
Company_Details: company_ID, Company_Name, Contact_Name, Address, Discount (in percent).
Car_details: Registration_Number, Tyre_type, Company ID.
Price: Type_Type, Price_ex_vat, Manufacturers_code.
Transaction: Invioce_Number, Date, Registration_Number, Number_of_Types_fitted.
what i am trying to do is to create a query which would display the details of all transactions together with the price (excluding vat), the subtotal (price_ex_vat * number_of_tyres_fitted), price after discount (subtotal - discount)(discount from the company_details table), and finally the total price includin VAT.
i have manage to create this query so far....but as soon as i display the company details table to calculate the discount i get the error...
SELECT DISTINCT Transaction.Invoice_Number, Transaction.Number_of_Tyres_Fitted, Price.Price_Ex_VAT, [Number_of_Tyres_Fitted]*[Price_Ex_VAT] AS Subtotal, [Subtotal]*1.175 AS Total
FROM Price INNER JOIN (Car_Details INNER JOIN [Transaction] ON Car_Details.Registration_Number = Transaction.Registration_Number) ON Price.Tyre_Type = Car_Details.Tyre_Type;
the above query is working fine....its just the discount section that i cant get to work.
please can someone help me out here.....
thanks
kay..
------
eXtacy