One table, dupe address, diff owners (1 Viewer)

boethos

Registered User.
Local time
Today, 08:43
Joined
Jul 5, 2017
Messages
21
Have you found the "find duplicates" query wizard? It will build the query for you if you are unfamiliar with SQl.


I did try that, but could only get it to find dupe of one column, not checking two columns. I don't need the dupes of owner and property, I need same property, different owners.
 

plog

Banishment Pending
Local time
Today, 07:43
Joined
May 11, 2011
Messages
11,638
Why aren't the records with the address '1341 HALL ST' in your expected results?
 

boethos

Registered User.
Local time
Today, 08:43
Joined
Jul 5, 2017
Messages
21
Why aren't the records with the address '1341 HALL ST' in your expected results?


I cut off the sample to get the table to you quicker
 

plog

Banishment Pending
Local time
Today, 07:43
Joined
May 11, 2011
Messages
11,638
So, this is just the method we discussed back in my first post. You will need 2 subqueries to get the data you want, here's the SQL for the first:

Code:
SELECT Sample_HSU_DB.Both_Name, Sample_HSU_DB.Both_addr
FROM Sample_HSU_DB
GROUP BY Sample_HSU_DB.Both_Name, Sample_HSU_DB.Both_addr;

Paste that into a new query object and name it '_sub1'. It gets all the unique name/addr permuations in your data. Next use this SQL:

Code:
SELECT [_sub1].Both_addr
FROM _sub1
GROUP BY [_sub1].Both_addr
HAVING (((Count([_sub1].Both_Name))>1));

Paste that into a new query with the name '_sub2'. It determines all the addr values that have multiple distinct name values. Finally, to get your data use this SQL:

Code:
SELECT Sample_HSU_DB.*
FROM _sub2 INNER JOIN Sample_HSU_DB ON [_sub2].Both_addr = Sample_HSU_DB.Both_addr;
 

boethos

Registered User.
Local time
Today, 08:43
Joined
Jul 5, 2017
Messages
21
So, this is just the method we discussed back in my first post. You will need 2 subqueries to get the data you want, here's the SQL for the first:

Code:
SELECT Sample_HSU_DB.Both_Name, Sample_HSU_DB.Both_addr
FROM Sample_HSU_DB
GROUP BY Sample_HSU_DB.Both_Name, Sample_HSU_DB.Both_addr;
Paste that into a new query object and name it '_sub1'. It gets all the unique name/addr permuations in your data. Next use this SQL:

Code:
SELECT [_sub1].Both_addr
FROM _sub1
GROUP BY [_sub1].Both_addr
HAVING (((Count([_sub1].Both_Name))>1));
Paste that into a new query with the name '_sub2'. It determines all the addr values that have multiple distinct name values. Finally, to get your data use this SQL:

Code:
SELECT Sample_HSU_DB.*
FROM _sub2 INNER JOIN Sample_HSU_DB ON [_sub2].Both_addr = Sample_HSU_DB.Both_addr;


So these are three separate queries? If so, I tried them and am getting all the records. I'm missing something. Thank you for your time.
 

plog

Banishment Pending
Local time
Today, 07:43
Joined
May 11, 2011
Messages
11,638
Yes they are 3 seperate queries. You need to create each one as instructed, then run the last one to retrieve the data you want.
 

boethos

Registered User.
Local time
Today, 08:43
Joined
Jul 5, 2017
Messages
21
Yes they are 3 seperate queries. You need to create each one as instructed, then run the last one to retrieve the data you want.

I did exactly that. I have 310 records.

Wooooowwwwww. Looks like what I'm looking for! Ya!

Thank you, thank you, thank you, thank you for your patience.

:):cool:
 

Users who are viewing this thread

Top Bottom