Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Help....

Author  Topic 

lmnorms1
Starting Member

7 Posts

Posted - 2008-05-22 : 14:37:23
Hello,
I am trying to select on unique agent numbers. Group by does not work in access for the records I am selecting. Other fields can be miss typed which don't allow the group by to work on license number.

I think I want to do a join or sub-select. How can I get this to work?
Select email, agent, license
from agenttable
where license = (Select license from agenttable group by license);

Thank you,
Patrick

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-05-26 : 06:40:17
Try

Select email, agent, license
from agenttable
where license in (Select license from agenttable group by license);


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -