09-18-2016 06:37 AM
Where is the syntax error?
WHERE product.item = cost.item AND product.item = sales.item;
Best regards, Cons.
09-18-2016 06:42 AM
You use alias in your select clause (p/c/s) but don't assign any aliases to your tables.
PS it's usually more efficient to specify join type and use ON rather than WHERE.
09-18-2016 04:11 PM
@Reeza, I agree with your diagnostic of OP's syntax error.
However, a simple WHERE clause is just as efficient as the ON clause of an INNER JOIN. One is simply translated into the other, when possible. I do prefer the JOIN syntax because it is more explicit, but it isn't more efficient.