Re: How to retrieve latest record when date and time are separate ?

From: Walt <walt_at_boatnerd.com.invalid>
Date: Wed, 09 Jul 2003 14:15:05 -0400
Message-ID: <3F0C5BA9.DB809458_at_boatnerd.com.invalid>


JN wrote:
>
> I record attendance of persons to table with these columns:
> PERSON_ID, DATE, TIME, CODE .
> Is it possible to write SQL query, which gives me latest record of all
> persons? Unfortunately, the DATE and TIME are separate columns.
> Thanks for any ideas.

Yes, but you'll find life a lot simpler if you just use the built in date datatype. The best answer is to re-model your data design to take advantage of the functionality provided by Oracle.

If you store date and time as strings and then try to manipulate them as dates you're re-enventing the wheel, working way to hard, and probably making some subtle mistakes along the way.

-- 
//-Walt
//
// "...the people can always be brought to the bidding of the leaders. 
//  That is easy. All you have to do is tell them they are being 
//  attacked, and denounce the pacifists for lack of patriotism and 
//  exposing the country to danger. It works the same in any country."  
//  - Herman Goering
Received on Wed Jul 09 2003 - 20:15:05 CEST

Original text of this message