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

  • Home
  • SEARCH
  • 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 8364965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:33:12+00:00 2026-06-09T12:33:12+00:00

Using MS Access with a SQL Server back end, I have one table basically

  • 0

Using MS Access with a SQL Server back end, I have one table basically storing groupings of the Parameter field from another table.

For example, I have the parameters stored in TBL_Parameter: (Just a very small subset of the data)

Parameter
Iron (Fe)
Iron (Fe)-Dissolved
Iron (Fe)-Total

The table, TBL_ParentParameter looks like this:

Parent        Child
Iron (Fe)     Iron (Fe)-Dissolved
Iron (Fe)     Iron (Fe)-Total

Then I want to create a query to combine all parameters not contained as a child in TBL_ParentParameter with all the ones that are contained in TBL_ParentParameter, so I made the following union query:

SELECT Parameter, Parameter AS Child
FROM TBL_Parameter
WHERE Parameter NOT IN(SELECT Child FROM TBL_ParentParameter)
UNION
SELECT Parent AS Parameter, Child
FROM TBL_ParentParameter

This has the expected results of:

Parent        Child
Iron (Fe)     Iron (Fe)
Iron (Fe)     Iron (Fe)-Dissolved
Iron (Fe)     Iron (Fe)-Total

But instead gives:

Parent               Child
Iron (Fe)            Iron (Fe)
Iron (Fe)-Dissolved  Iron (Fe)-Dissolved
Iron (Fe)-Total      Iron (Fe)-Total

Now each query within the union query works perfectly fine individually, but when unioned, they don’t work properly. I have tried this exact same query as a passthrough query directly to the SQL server, which works just fine, but if I base other queries on this query, I find that it can take a few times longer to run. So does anyone have any idea what the issue is here? Is this some sort of MS Access bug? Or am I looking at this wrong?

SOLVED: It appears that this is a bug with MS Access, and reversing the order of the two union subqueries fixed the issue.

  • 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-06-09T12:33:14+00:00Added an answer on June 9, 2026 at 12:33 pm

    It appears that this is a bug with MS Access, and reversing the order of the two union subqueries fixed the issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need to query my SQL server from Access using an ADO connection (for example),
I have been tasked with writing an ADP application using Access. The back-end data
I am using Access 2007 (VBA - adp) front end with a SQL Server
I have an existing application which uses Sql Server 2005 as a back-end. It
i have an access front end and sql server backend. i would like to
I am using DataSets for access to Sql Server 200x in a C# project.
I'm using SQL Server 2008 with Hibernate 3.0 at data access layer of my
I am using EF to access Sql azure. In one situation I need to
I'm using Linq to SQL to access my database. I want to have a
I am using a function to import data from a access db into SQL

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.