View Full Version : Selection query


wmaclean
07-09-2009, 05:02 AM
I have a database consisting of a single table. Each row in the table contains certain information about an individual residential property in a certain U.S. county. Among these fields are the address of the property "a" and the address of the owner "b". I simply want to display only those rows where a<>b. I constructed a query where in the criteria field for "a", I wrote [table].[a]<>[table].[b] but this doesn't seem to work. Can someone tell me why?

FYI, both "a" and "b" are text fields and of the same length and I am using Access 2003.

Many thanks,
Wellen

SOS
07-09-2009, 08:14 AM
If it is all one table, then the criteria in field A should be an equals sign and the second field name in brackets. Just that.

=[B]

wmaclean
07-09-2009, 09:32 AM
Thank you very much for your reply. Since I only want to display those rows where a<>b should the criteria field be <>[b]?

SOS
07-09-2009, 09:45 AM
Thank you very much for your reply. Since I only want to display those rows where a<>b should the criteria field be <>[b]?

Yep, that would be it.