Home » SQL & PL/SQL » SQL & PL/SQL » Re: Find duplicate record help
Re: Find duplicate record help [message #21615] Fri, 16 August 2002 21:35
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
First off, you should never break the date and time into separate columns - the DATE datatype supports both in a single column. This example uses a single DATE column that includes both the date and time:

select *
  from classes
 where (class_id, class_datetime) in
   (select class_id, max(class_datetime)
      from classes
     group by class_id);
Previous Topic: Date Query Problem
Next Topic: can a PL/SQL fopen function read a remote file?
Goto Forum:
  


Current Time: Fri Apr 26 20:05:16 CDT 2024