This is another newbie question from your friend Fdisk...
I have 2 tables with the exact same records. On has the addresses separated by house number, st, direction, type, etc. The other has the address in full.
I want to select * but only households, not individuals.
If I do SELECT DISTINCT Address FROM Table2 I get 296 distinct records, that's great. However, if I do
SELECT DISTINCT Address, PrimaryKey FROM Table2
I get all 400 records because the PrimaryKey field is full of uniques, no repeated values. How can I make a query to select only one person per household?
What I'd like to do is a query where I select the distinct addresses and only 1 of the many PrimaryKeys that might be in the same address so I can link it to Table1 and get the rest of the info from it.
Thanks in advance for the help.
I have 2 tables with the exact same records. On has the addresses separated by house number, st, direction, type, etc. The other has the address in full.
I want to select * but only households, not individuals.
If I do SELECT DISTINCT Address FROM Table2 I get 296 distinct records, that's great. However, if I do
SELECT DISTINCT Address, PrimaryKey FROM Table2
I get all 400 records because the PrimaryKey field is full of uniques, no repeated values. How can I make a query to select only one person per household?
What I'd like to do is a query where I select the distinct addresses and only 1 of the many PrimaryKeys that might be in the same address so I can link it to Table1 and get the rest of the info from it.
Thanks in advance for the help.