Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Over Partition by

Status
Not open for further replies.

roedelfroe

Programmer
Jan 7, 2004
30
DE
Hi,

I've written a statement, which works fine but it is rather slow.

Does anybody got a better idea?

select * from
(
select a.*, row_number() over(partition by row1, row2 order by row3 desc) as xxx
from TABLE a
where DATE <= to_date('01.01.2009', 'DD.MM.YYYY')
and DELETED is NULL
) x
where xxx=1
order by row1, row2;

Thanks in advance

roedelfroe
 
Sorry, wrong forum! Please ignore, I've asked my question in the correct forum again.

roedelfroe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top