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
 SELECT DISTINCT from one table?

Author  Topic 

kakarotmf
Starting Member

2 Posts

Posted - 2011-07-08 : 11:44:18
Here is my Table:

ID | Name | Date

I want my query to look like this:

ID | Date

But I want only unique Date values. I cannot use SELECT DISTINCT because all the ID fields are unique. I tried using JOIN commands byd referencing this one table as two tables using the AS command, but couldn't get that to work.

Any suggestions?

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-07-08 : 12:33:07
How will you decide which ID should show up when there are more than one id per date?
Go to Top of Page

kakarotmf
Starting Member

2 Posts

Posted - 2011-07-08 : 23:52:10
Hmm. Didn't think about that.

I now see that I can't do what I want to do, and for good reason. After thinking about it some more, I see I set up my DATE Table incorrectly. Now that I've reorganized the DATE Table, I can write the (Lookup) Query I want to.

Thanks!
Go to Top of Page
   

- Advertisement -