Proper query to check two different fields of a table

bknight
BronzeLounger
Posts: 1373
Joined: 08 Jul 2016, 18:53

Proper query to check two different fields of a table

Post by bknight »

How should I create a query that checks two field values?
In other words where [field 1] <> [field 2] ?

User avatar
HansV
Administrator
Posts: 78386
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Proper query to check two different fields of a table

Post by HansV »

In the Criteria row of Field1, enter

<>[Field2]

(or vice versa)
Best wishes,
Hans

bknight
BronzeLounger
Posts: 1373
Joined: 08 Jul 2016, 18:53

Re: Proper query to check two different fields of a table

Post by bknight »

Um ok there were a few, however can you explain these leftovers?
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78386
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Proper query to check two different fields of a table

Post by HansV »

I'd have to see the original data.
Best wishes,
Hans

bknight
BronzeLounger
Posts: 1373
Joined: 08 Jul 2016, 18:53

Re: Proper query to check two different fields of a table

Post by bknight »

Too big, but I can include all of the fields in an Excel sheet if that would help.

User avatar
HansV
Administrator
Posts: 78386
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Proper query to check two different fields of a table

Post by HansV »

No, copying into Excel might alter the data.
If you wish, you can send the database to me (hans dot vogelaar at gmail dot com).
I will treat the data confidentially.
Best wishes,
Hans

User avatar
HansV
Administrator
Posts: 78386
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Proper query to check two different fields of a table

Post by HansV »

bknight sent me the database, but since the problematic data had already been removed, there was no way to find the cause of the problem.
Best wishes,
Hans