Reputation: 11
I am trying to return the Average as a FLOAT, but when I use the code bellow, I get an error every time in Access saying MissingOperator. What am I missing in my code?
SELECT AVG(CAST(Quantity AS FLOAT))
FROM Orders
Upvotes: 0
Views: 323
Reputation: 1270421
I often just write:
SELECT AVG(1.0 * Quantity)
FROM Orders;
However, this might return the value as a decimal rather than a float
.
Upvotes: 0