Tom,
I think I must assume so. The third party Oracle DB collects data
from 1,000+ points of entry. There seems to be a lot of turn over in
the department that administrates it. Put that together with the
fact that the specs don't call for records of the data file to be in
cronological order (and thus transNum) I'd like to make this water-
tight as possible.
I wanted transnum returned because I _know_ it is unique and I
can build views from there. Failing that, I suppose I could use the
date/time I'm getting now since it's unlikely to be duplicated for any
one person ID.
Thanks,
Ben
On 18 Aug 2001, at 10:19, Tom Grimshaw wrote:
> G'day Ben,
>
> Is it possible, for one person, to have a higher tran no with an earlier date
> than a later date with an earlier tran no?
>
> At 04:57 PM 17/08/2001 +0100, you wrote:
> >On 18 Aug 2001, at 9:03, Tom Grimshaw wrote:
> >
> > > G'day Ben,
> > >
> > > (MAX(TransNum)) doesn't do it?
> > >
> >
> >Nope.
> >
> >Imagine the following:
> >
> >personID TransNum, TransDate
> >100 1 1/10/2001
> >100 2 1/1/2001
> >200 3 3/1/2001
> >100 4 1/5/2001
> >
> >Sel personID, (max(TransNum)),
> >(max(datetime(TransDate,TransTime))) from
> >TableNm group by MemberID
> >
> >for ID 100 this returns 100, 4, 1/10/2001
> >
> >when what I want is
> >100, _1_, 1/10/2001
> >
> >Actually, I don't really need the date returned, just the id and
> >transnum.
> >
> >Thanks,
> >
> >Ben
> >
> >
> > > At 03:26 PM 17/08/2001 +0100, you wrote:
> > > >I could use some help with a select statement.
> > > >
> > > >Imagine a table like this:
> > > >
> > > >personID, TransNum, TransDate, TransTime and other stuff
> > > >
> > > >This table may contain many entries for any personId, but only the
> > > >one with the most recent TransDate/TransTime is valid. The data
> > > >actually comes from a foreign DB and TransNum is the numerical
> > > >sequence within the data file.
> > > >
> > > >I'd like a select statement that returns personID and TransNum for
> > > >the most recent date/time for each personID for use in a view.
> > > >
> > > >At this point I have:
> > > >
> > > >Sel personID, (max(datetime(TransDate,TransTime))) from
> > > >TableNm group by MemberID
> > > >
> > > >I haven't found a way to return TransNum from the same record that
> > > >qualifies as (max(datetime....))
> > > >
> > > >TIA,
> > > >
> > > >Ben Petersen
> > >
> > > Warmest regards,
> > >
> > >
> > > Tom Grimshaw
> > > coy: Just For You Software
> > > tel: 612 9552 3311
> > > fax: 612 9566 2164
> > > mobile: 0414 675 903
> > >
> > > post: PO Box 470 Glebe NSW 2037 Australia
> > > street: 3/66 Wentworth Park Rd Glebe NSW 2037
> > >
> > > email: [EMAIL PROTECTED]
> > > web: www.just4usoftware.com.au
> > >
> > > This email and any files transmitted with it are confidential to the
> > > intended recipient and may be privileged. If you have received this email
> > > inadvertently or you are not the intended recipient, you may not
> > > disseminate, distribute, copy or in any way rely on it. Further, you
> > should
> > > notify the sender immediately and delete the email from your computer.
> > > Whilst we have taken precautions to alert us to the presence of computer
> > > viruses, we cannot guarantee that this email and any files transmitted
> > with
> > > it are free from such viruses.
> > >
> > >
>
> Warmest regards,
>
>
> Tom Grimshaw
> coy: Just For You Software
> tel: 612 9552 3311
> fax: 612 9566 2164
> mobile: 0414 675 903
>
> post: PO Box 470 Glebe NSW 2037 Australia
> street: 3/66 Wentworth Park Rd Glebe NSW 2037
>
> email: [EMAIL PROTECTED]
> web: www.just4usoftware.com.au
>
> This email and any files transmitted with it are confidential to the
> intended recipient and may be privileged. If you have received this email
> inadvertently or you are not the intended recipient, you may not
> disseminate, distribute, copy or in any way rely on it. Further, you should
> notify the sender immediately and delete the email from your computer.
> Whilst we have taken precautions to alert us to the presence of computer
> viruses, we cannot guarantee that this email and any files transmitted with
> it are free from such viruses.
>
>