Comparing Two fields

  • Thread starter Thread starter snooky
  • Start date Start date
S

snooky

I have a database with street names and address names..field 2 is address and
field 3 is street names. I need to find a way to see which in the two fields
are the same and which ones are not the same. I am very new at this. Can
someone please help.
 
snooky said:
I have a database with street names and address names..field 2 is address
and
field 3 is street names. I need to find a way to see which in the two
fields
are the same and which ones are not the same. I am very new at this. Can
someone please help.

snooky,

To find records where the fields match:

SELECT * FROM YourTableName WHERE Field1=Field2;

To find records where the fields do not match:

SELECT * FROM YourTableName WHERE Field1<>Field2;

You will need to replace the table and field names as appropriate. If they
have spaces in them (which they shouldn't) you will need to enclose the
names in squeare brackets:

SELECT * FROM [Your Table Name] WHERE [Field 1]<>[Field 2];

Ed Metcalfe.
 
Back
Top