Larry,

SELECT * +
 FROM TransMaster t1 +
 WHERE (DateTime(TransDate,TransTime)) = +
  (Sel (Max(DateTime(TransDate,TransTime))) +
  from TransMaster WHERE CustID = t1.CustID)

Of course, this assumes TransMaster has a TransTime col (I didn't 
check).

Thanks again!

Ben Petersen




On 18 Aug 2001, at 9:50, Lawrence Lustig wrote:

> > I got to looking at this some more.  So many transactions had the
> > same date that the select filtered out very few records.  So I used
> > the datetime function and it got better.  But darned if there weren't
> > a bunch of records with duplicate Ids/dates/times (I had thought
> > that would be a rare occurrence). I ended up deleting the duplicates
> > and using your select construct. Works like a champ; I would never
> > have thought of using that correlation.
> 
> Yes, I figured your problem had to be with multiple records on the same
> date -- could you post the Datetime construct that you used?  Thanks for
> posting the original question -- it finally got me off my lazy behind to
> look for a better way of doing that kind of query.
> --
> Larry
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 


Reply via email to