Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6741783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:46:00+00:00 2026-05-26T11:46:00+00:00

I have this query that is supposed to be used in MS Access, but

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:46:00+00:00Added an answer on May 26, 2026 at 11:46 am

    When you join more than 2 tables, Access requires parentheses and is very finicky about their placement. (Although one of your query’s data sources is a subquery rather than an actual table, it’s treated same as a table regarding joins and parentheses.) Suggest you build this as a new query in Access’ query designer simply to see how it places the parentheses for your joined tables.

    “count” is a reserved word, so I bracketed that name everywhere it appeared in the query to reduce the chance of confusing the database engine.

    Use LEFT JOIN instead of LEFT OUTER JOIN for Access’ db engine.

    I think this may be close to what you need.

    SELECT
        Total.[count],
        SUM(dbo_tblItem.item_premium + dbo_tblItem.item_pr) AS SumTotal,
        dbo_tblBidder.bidder_type
    FROM         
        (dbo_tblBidder LEFT 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 JOIN (
            SELECT     COUNT(bidder_type) AS [count], bidder_type
            FROM          dbo_tblBidder
            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;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have this query that works perfectly: SELECT users.*, GROUP_CONCAT(categories.category_name) AS categories FROM
I have a hierarchical query in Oracle 10 SQL that used to work. However,
I have this linq query that works well (although it may be written better,
I have used this tutorial to make a website, but I would like that
I have this query that inserts rows, using a subquery like so: INSERT INTO
So I have this awesome MySQL query that's returning me an awesome array >
This query that I have is returning therapists whose 'therapistTable.activated' is equal to false
I have this query to fetch the total OrderStatus that have values 1 and
I have an NHibernate query that looks like this: var query = Session.CreateQuery(@ select
I have a Linq query that looks something like this: var query = from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.