From: LN on 19 Jan 2010 18:46 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 19 Jan 2010 21:33 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 19 Jan 2010 23:17 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 20 Jan 2010 04:45 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
|
Pages: 1 Prev: Field with 6 data points seperated by ~ Next: oracle RowType Issue |