SELECT DISTINCT returns the lowest date value twice

vman

New member
Local time
Yesterday, 21:32
Joined
Jul 19, 2012
Messages
6
Hi,

I am writing a SELECT DISTINCT query to find unique values in one of the columns in my database. However, the query seems to be returning the lowest value twice. Can anybody point out what am I missing?

My data is :

WeekEndingDate
17-Aug-12
17-Aug-12
24-Aug-12
10-Aug-12
10-Aug-12
17-Aug-12
17-Aug-12
17-Aug-12

My query is :

SELECT DISTINCT WeekEndingDate
FROM tblTasks;

and the result I am getting is :

WeekEndingDate
10-Aug-12
10-Aug-12
17-Aug-12
24-Aug-12

Why is 10-Aug-12 coming up two times even when the DISTINCT keyword has been coded?
 
Open your table and change the format of the column to general date, to see if there is a time component
 
Perfect! Thanks for the quick reply spikepl. That really was the problem.
 

Users who are viewing this thread

Back
Top Bottom