I have a table that we'll call TI. In TI are fields
recid Po. Co.Num
01 16 4521
02 17 4632
03 18 9854
Also this table joins to what we'll call T2 via recid and in T2 are fields
recid Co. date
01 FW 04/15/2008
01 FC 04/15/2008
02 CW 06/15/2008
03 EW 06/14/2009
In TI the primary key in the recid, but T2 doesn't have a recid because it can have more that one Company (Co.)
When writing a select statement, I would like for my query to display only distinct recids.
01 FW 04/15/2008
02 CW 06/15/2008
03 EW 06/14/2008
Using distinct won't work because it looks at the complete row. Since the Co are different, it pulls all three. I don't need for it to pull duplicate record id. I've using group by and union but then again I could be writing the query wrong
Start Free Trial