Field Duplicate Values

B

Bridget Stacy

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?
 
B

Brian Camire

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?
 

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