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 6868507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:26:33+00:00 2026-05-27T03:26:33+00:00

I am comparing two table like this: SELECT * FROM tableA AS A INNER

  • 0

I am comparing two table like this:

SELECT *
FROM tableA AS A INNER JOIN tableB AS B ON B.ID = A.ID
WHERE A.col1 <> B.col1 OR A.col2 <> B.col2 OR ...

This query doesn’t work because I have a type mismatch somewhere (and Access doesn’t tell me which columns don’t match).

Is there an efficient way to find which columns don’t match?
Is there a way to ignore the mismatch and compare anyways?

edit:
I tried casting everything to strings using Cstr (inspired by Tuck’s answer), but Access says I have an Invalid use of Null in there. Does that mean that Cstr is returning a Null? If so, I tried nz(Cstr(...), 0) and that doesn’t help either.

edit:
Moving the call to nz inside the call to Cstr got rid of that Invalid use of Null and solved the problem: Cstr(nz(..., 0))

  • 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-27T03:26:34+00:00Added an answer on May 27, 2026 at 3:26 am

    I’m not sure if Access supports CAST() operations but in your WHERE clause you can try:

    WHERE CAST(A.col1 AS VARCHAR(100)) <> CAST(b.col1 AS VARCHAR(100)) 
    

    If varchar isn’t supported, use a type that Access does support.

    For your first pass, wrap all your column comparisons with the CAST() operation.
    Once that works, remove the CAST() operations one by one from your column comparisons until you find the pairing that doesn’t work.

    Hopefully someone with better Access knowledge can provide you with a faster solution.

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

Sidebar

Related Questions

From http://projecteuler.net/index.php?section=problems&id=99 Comparing two numbers written in index form like 2 11 and 3
how can i delete from table A while comparing two fields A.P and A.C
Possible duplicate : comparing-two-arrays I have two NSArray and I'd like to create a
My problem is I am comparing two records from different tables and deleting those
I have two tables. My first table is called as WORLD and this table
I have two datasets each with one data table pulled from different sources and
I have a table like this id, name, datetime which might store multiple entries
Comparing two sql values that are almost the same. I know this is simple
I have two tables, table1 and table2. And I join them by comparing a
Let's assume I have the following query: SELECT address FROM addresses a, names n

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.