I have this query that is supposed to be used in MS Access, but the database is an SQL database. When I run this query in an SQL environment, it works perfectly. However, when ran in MS Access, I get errors. I know little about SQL to begin with (coming from MySQL), and even less about MS Access.
The query is supposed to give me the total number of people within a certain bidder type who bid on an item (whether they won it or not), the total price of items won within that bidder type, and the bidder type, all for a single auction. Here is the query below.
SELECT Total.count, SUM(dbo_tblItem.item_premium + dbo_tblItem.item_pr) AS SumTotal, dbo_tblBidder.bidder_type
FROM dbo_tblBidder LEFT OUTER JOIN
dbo_tblItem ON dbo_tblItem.item_bidder_number = dbo_tblBidder.bidder_number AND
dbo_tblItem.item_sale_id = dbo_tblBidder.bidder_sale_id LEFT OUTER JOIN
(SELECT COUNT(bidder_type) AS count, bidder_type
FROM dbo_tblBidder AS tblBidder_1
WHERE (bidder_sale_id = 235)
GROUP BY bidder_type) AS Total ON dbo_tblBidder.bidder_type = Total.bidder_type
WHERE (dbo_tblBidder.bidder_sale_id = 235)
GROUP BY dbo_tblBidder.bidder_type, Total.count
ORDER BY dbo_tblBidder.bidder_type
MS Access tells me:
Syntax error (missing operator) in query expression ".
Then, it highlights "mber" from dbo_tblBidder.bidder_number where it says:
dbo_tblItem ON dbo_tblItem.item_bidder_number = dbo_tblBidder.bidder_number
I don't know if the highlighting is actually part of anything or not.