Archives of the TeradataForum
Message Posted: Thu, 11 Aug 2005 @ 20:32:58 GMT
Subj: | | Re: Finding the earliest combination of separate DATE and TIME fields |
|
From: | | Ken Hansen |
Hi Simon - not sure what you mean by earliest combination nor the size of your table - if you mean the earliest time on the earliest date then
try
sel min(starttime)
from IndividualActivity
where startdate = (sel min(startdate) from IndividualActivity
You can nest a number of correlated subqueries in this manner so the whole line could be part of the where clause for all records with
that starttime and startdate.
Goodluck,
Ken
|