Hi,
I have two tables (table1 and table2):
Table1:fld_1 (PK)fld_2fld_3
Table2:fld_a (PK)fld_bfld_c
Table1.fld_1 and Table2.fld_b are related.
What I want is a list which selects unique rows in Table1 which related to Table2.
So:
Table1:1 Jim Jones2 Geoff Hill3 Tony James
Table2:1 1 Bob2 1 Milly3 1 Tilly4 2 Joe5 2 Jilly6 3 FrankSo Jim should related to: Bob, Milly and Tilly. Geoff: Joe and Jilly. And Tony: Frank.An inner join returns multiple records of Jim and Geof as there are multiple records relating to them, where as I only want them to appear once.Any suggestions? :(
DISTINCT is the keyword you want, I believe.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)