alexanderthegreat
IS-IT--Management
I am trying to select only the distinct monthyear from my table but I have to order it by eventdate DESC
SELECT DISTINCT TOP 100 PERCENT monthyear
FROM dbo.newsservices
ORDER BY eventdate DESC
But this what happens:
monthyear eventdate
May 2004 5/10/2004
April 2004 4/15/2004
March 2004 3/30/2004
March 2004 3/17/2004
March 2004 3/9/2004
March 2004 3/1/2004
February 2004 2/22/2004
February 2004 2/9/2004
Whereas I need just one month of March to show for example.
SELECT DISTINCT TOP 100 PERCENT monthyear
FROM dbo.newsservices
ORDER BY eventdate DESC
But this what happens:
monthyear eventdate
May 2004 5/10/2004
April 2004 4/15/2004
March 2004 3/30/2004
March 2004 3/17/2004
March 2004 3/9/2004
March 2004 3/1/2004
February 2004 2/22/2004
February 2004 2/9/2004
Whereas I need just one month of March to show for example.