S
Support
Hi, I'm v new to Access and have been asked to write a query on a database
we have.
There is one table which has a field called o_OrderSubTotalIncVAT which
gives total order value.
I've written this query:
SELECT tblFinal2.c_SourceCustomerId, tblFinal2.c_Title,
tblFinal2.c_FirstName, tblFinal2.c_LastName,
tblAllorderlines2.l_OrderNumber, tblOrders2.o_OrderDate,
tblAllorderlines2.l_ProductReference,
tblAllorderlines2.l_OrderLineProductDescription,
tblAllorderlines2.l_UnitPriceIncVAT, tblAllorderlines2.l_ProductQuantity,
tblAllorderlines2.l_PriceIncVAT, tblOrders2.o_OrderSubTotalIncVAT,
tblOrders2.o_OrderShippingCost, tblOrders2.o_OrderTotalIncVAT
FROM (tblFinal2 INNER JOIN tblOrders2 ON tblFinal2.c_SourceCustomerId =
tblOrders2.o_SourceCustomerID) INNER JOIN tblAllorderlines2 ON
tblOrders2.o_OrderNumber = tblAllorderlines2.l_OrderNumber;
This works and gives me the orders however I would like to find orders over
300. When I add the criteria >"300" or SQL:
WHERE (((tblOrders2.o_OrderTotalIncVAT)>"300"))
I still get values under 300. I have tried sorting (descending) the data
both from the query and also just in the field. All times it lists it in
order from 9-0 including mulitples thereof eg 99, 94, 9.45, 87, 8.4,700, 75,
7.6 etc etc - hope that is clear!
Where I am going wrong here?
thanks
we have.
There is one table which has a field called o_OrderSubTotalIncVAT which
gives total order value.
I've written this query:
SELECT tblFinal2.c_SourceCustomerId, tblFinal2.c_Title,
tblFinal2.c_FirstName, tblFinal2.c_LastName,
tblAllorderlines2.l_OrderNumber, tblOrders2.o_OrderDate,
tblAllorderlines2.l_ProductReference,
tblAllorderlines2.l_OrderLineProductDescription,
tblAllorderlines2.l_UnitPriceIncVAT, tblAllorderlines2.l_ProductQuantity,
tblAllorderlines2.l_PriceIncVAT, tblOrders2.o_OrderSubTotalIncVAT,
tblOrders2.o_OrderShippingCost, tblOrders2.o_OrderTotalIncVAT
FROM (tblFinal2 INNER JOIN tblOrders2 ON tblFinal2.c_SourceCustomerId =
tblOrders2.o_SourceCustomerID) INNER JOIN tblAllorderlines2 ON
tblOrders2.o_OrderNumber = tblAllorderlines2.l_OrderNumber;
This works and gives me the orders however I would like to find orders over
300. When I add the criteria >"300" or SQL:
WHERE (((tblOrders2.o_OrderTotalIncVAT)>"300"))
I still get values under 300. I have tried sorting (descending) the data
both from the query and also just in the field. All times it lists it in
order from 9-0 including mulitples thereof eg 99, 94, 9.45, 87, 8.4,700, 75,
7.6 etc etc - hope that is clear!
Where I am going wrong here?
thanks