fokuslee
May 12th, 2009, 06:47 PM
I want to select unique record based on one single field, meaning even if other fields are complete different i still consider them the same, and then display each unique record w/ all the attributes
Im doing this in access
Maybe below is more clear
Select CustID, [Date], PartNo, Qty
From Orders
Where CustID IN (Select CustID From Orders Group By CustID Having Count(*) >
1)
but i just want to see one record from each group by custid.
ie
CustID Date PartNo Qty
122 9/11 block 5
122 6/22 wood 4
122 5/30 wine 6
i just want the query to return
122 9/11 block 5 (or any 1 row for that matter)
thats it
is this possible i am having a really hard time
thanks:confused:
Im doing this in access
Maybe below is more clear
Select CustID, [Date], PartNo, Qty
From Orders
Where CustID IN (Select CustID From Orders Group By CustID Having Count(*) >
1)
but i just want to see one record from each group by custid.
ie
CustID Date PartNo Qty
122 9/11 block 5
122 6/22 wood 4
122 5/30 wine 6
i just want the query to return
122 9/11 block 5 (or any 1 row for that matter)
thats it
is this possible i am having a really hard time
thanks:confused: