A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Trying to find values that are not equal



 
 
Thread Tools Display Modes
  #1  
Old July 1st, 2008, 08:05 PM posted to microsoft.public.access.queries
Cindy
external usenet poster
 
Posts: 385
Default Trying to find values that are not equal

Hi;
I am a new user... I have the same field in two different tables. I tried a
query to find the records where the values are not equal. I used the
expression builder but got zero records which I know is not correct. I tried
expression builder using the following:
Table_A, Field = RSL_1
Table_B, Field = RSL_1 =There is a right join only from table A to B (I
only want to see the unequal values in Table A)

I entered the following select query criteria under RSL_1, Table_A
[Table_B]![RSL_1]. I also tried 'Not Like' instead of and got no
records for either. Does anyone know what I'm doing wrong?
Thanks!

  #2  
Old July 1st, 2008, 08:34 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Trying to find values that are not equal

Select *
From Table_A
Where RSL_1 Not In (Select RSL_1
From Table_B) ;

Or in query design view put the following in the criteria of the RSL_1 field:

Not In (Select RSL_1 From Table_B)

If you want to see the opposite results, switch the table names.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Cindy" wrote:

Hi;
I am a new user... I have the same field in two different tables. I tried a
query to find the records where the values are not equal. I used the
expression builder but got zero records which I know is not correct. I tried
expression builder using the following:
Table_A, Field = RSL_1
Table_B, Field = RSL_1 =There is a right join only from table A to B (I
only want to see the unequal values in Table A)

I entered the following select query criteria under RSL_1, Table_A
[Table_B]![RSL_1]. I also tried 'Not Like' instead of and got no
records for either. Does anyone know what I'm doing wrong?
Thanks!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.