Comparing Two fields

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.
 
E

Ed Metcalfe

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top