|
Posted by schapopa on 01/23/07 07:47
I have solution unless somebody has better one:
Create temp table with dates only, grouped by quarter and do right join
query on MyTable.
Create Table #temp1
(
IdTemp1 int not null Primary key identity ,
[date] datetime
)
Insert into #temp1
(
[date]
)
Select
Max(date)
from MyTable
group by Year([date]), DatePart (quarter,[date])
order by Year([date]), DatePart (quarter,[date])
select * from MyTable right join #temp1 on mytable.date = #temp1.date
*** Sent via Developersdex http://www.developersdex.com ***
[Back to original message]
|