Field Duplicate Values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I write a query that will match one field in a table to another? For example, I have a table of records that include Account Name and Advertiser Name. I want to get a list of records where these two field values are the same. Is that possible?
 
In query design view, you might set the Criteria for the Account Name field
to

[Advertiser Name]

Equivalently, you might try a query whose SQL looks something like this:

SELECT
[Your Table].*
FROM
[Your Table]
WHERE
[Your Table].[Account Name] = [Your Table].[Advertiser Name]

Note that this will not return records where both Account Name and
Advertiser Name are null. If you want these records, you might try:

SELECT
[Your Table].*
FROM
[Your Table]
WHERE
[Your Table].[Account Name] = [Your Table].[Advertiser Name]
OR
([Your Table].[Account Name] Is Null
AND
[Your Table].[Advertiser Name] Is Null)


Bridget Stacy said:
How do I write a query that will match one field in a table to another?
For example, I have a table of records that include Account Name and
Advertiser Name. I want to get a list of records where these two field
values are the same. Is that possible?
 
Back
Top