Home » SQL & PL/SQL » SQL & PL/SQL » Select the data with highest update no (oracle 8.1.1.0, windows 2000)
Select the data with highest update no [message #398361] Thu, 16 April 2009 02:00 Go to next message
PadmajaKumar
Messages: 7
Registered: November 2006
Location: Chennai,India
Junior Member
My question may be silly, but sorry for my ignorance.

I have the following the data.

empno updateno salary

1 0 300
2 0 400
3 0 500
1 1 800
2 1 900
1 3 1000
2 2 500
3 4 600

I want the output in this manner.

empno updateno salary
1 3 1000
2 2 500
3 4 600

that is empno, salary with the latest updateno .

Kindly help me.

Thanks in advance.
Re: Select the data with highest update no [message #398371 is a reply to message #398361] Thu, 16 April 2009 02:16 Go to previous message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Check this.
You may need to search analytical functions. Try with partition by.

By
Vamsi
Previous Topic: query help
Next Topic: SQL Question / Analytic function
Goto Forum:
  


Current Time: Sun Dec 04 00:34:26 CST 2016

Total time taken to generate the page: 0.06418 seconds