Home » SQL & PL/SQL » SQL & PL/SQL » How to reterive the newly updated record? (Oracle 10g)
How to reterive the newly updated record? [message #355909] Tue, 28 October 2008 08:12 Go to next message
aviva4500
Messages: 122
Registered: July 2008
Location: bangalore
Senior Member
Dear All,
I am in need of a kind suggestion in the datepart.I have a table name called Test,which has 3 columns.The data is shown below:
----------------------------------------------------------------
Name country datecreated datetimelastmodified
XXX yyy 9/15/2008 1:54:23 PM 9/15/2008 1:55:12 PM
XXX zzz 9/15/2008 1:54:23 PM 10/23/2008 3:52:16PM
----------------------------------------------------------------
If i issue the distinct query on the above data i get both the records obviously.But i need only the record which is recently modified in my output.That is the second one which is modified on 10/23/2008 3:52:16PM.

Thanks & Regards
Hammer.
Re: How to reterive the newly updated record? [message #355910 is a reply to message #355909] Tue, 28 October 2008 08:15 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
hi


use max in time modified column
Re: How to reterive the newly updated record? [message #355915 is a reply to message #355909] Tue, 28 October 2008 08:49 Go to previous message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Have a look at ROW_NUMBER, RANK and DENSE_RANK functions.

please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Previous Topic: What procedure was originally called
Next Topic: Query Help
Goto Forum:
  


Current Time: Sat Feb 08 20:51:24 CST 2025