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
 Problems with Select distinct

Author  Topic 

freq
Starting Member

17 Posts

Posted - 2007-10-15 : 13:05:55
I'm having problems with the below select statement..

select distinct LogProject, LoginDate from tblCheckIn where VolunteerID=" & VolID & " order by LoginDate

It's not giving me unique LogProjects.

But if I remove LoginDate and use the below select statement, it seems to work..
select distinct LogProject from tblCheckIn where VolunteerID=" & VolID & "

Problem is, I need the LoginDate. Is there something wrong with the syntax?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-10-16 : 02:20:03
Extensive help found here in this cross post
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=91009



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

georgev
Posting Yak Master

122 Posts

Posted - 2007-10-16 : 11:05:21
http://weblogs.sqlteam.com/jeffs/archive/2007/10/12/sql-distinct-group-by.aspx
Go to Top of Page
   

- Advertisement -