Hello all.
I am in the need of some help please.
I have an SQL statement that works on a MySQL Database, but I need to get it to work on an Access Database.
The statement is,
I am having trouble with the IFNULL part as it comes back with an Undefined Function.
I have searched through the forums, and found one with Nz, but I tried to substitute the code, but it wont and comes back with undefined functions.
If anybody can help, I would be greatful.
Thanks
Paul.
I am in the need of some help please.
I have an SQL statement that works on a MySQL Database, but I need to get it to work on an Access Database.
The statement is,
Code:
SELECT Job_No, IFNULL((SELECT sum(Paying_Rate*Working_Hrs) FROM Labour WHERE Job_No = Job.Job_No),0) AS Labsubtotal, IFNULL((SELECT sum(Quantity*Unit_Price+(Quantity*Unit_Price*+Additional_Cost/100)) FROM Material WHERE Job_No = Job.Job_No),0) AS Matsubtotal, Labsubtotal*0.175 AS Labvat, Matsubtotal*0.175)AS Matvat, Matsubtotal + Labsubtotal AS subtotal, Labsubtotal*0.175 + Matsubtotal*0.175 AS vat, Labsubtotal*1.175 + Matsubtotal*1.175 AS TOTAL, Job.Order_Date, Job.File_No, Job.Contract, Job.Order_Site_Address, Job.Job_Description, Job.Invoice_Tax_Date, Job.CustomerRef, Job.Customer_Name, Customer.Billing_Address FROM Job LEFT JOIN Customer ON(Job.Customer_Name=Customer.Customer_Name)
I have searched through the forums, and found one with Nz, but I tried to substitute the code, but it wont and comes back with undefined functions.
If anybody can help, I would be greatful.
Thanks
Paul.
Comment