From: LN on
I need a query to display the date like below. Thank you in advance.

9/1/07
10/1/07
11/1/07
12/1/07
1/1/08

12/1/09
1/1/10
From: Plamen Ratchev on
This will be best done client side or in reporting interface. Here is one T-SQL solution:

SELECT LTRIM(MONTH(dt)) + '/' + LTRIM(DAY(dt)) + '/' + RIGHT(YEAR(dt), 2)
FROM Foo;

--
Plamen Ratchev
http://www.SQLStudio.com
From: --CELKO-- on
One of the basic rules of a tiered architecture is that display is
done in the front end. This is FAR more basic than SQL.
From: Andrew Morton on
LN wrote:
> I need a query to display the date like below. Thank you in advance.
>
> 9/1/07
> 10/1/07
> 11/1/07
> 12/1/07
> 1/1/08
> .
> 12/1/09
> 1/1/10

I suspect that what you want is a calendar table (google "sql calendar
table") from which you select dates from some start date to an end date.

But what logic is it that says you want the 9th-12th January '07, then 1st
Jan '08...???, 12th Jan '09, 1st Jan '10?

Andrew