home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- From: davec@wsti.demon.co.uk (David Churcher)
- Path: sparky!uunet!pipex!demon!wsti.demon.co.uk!davec
- Subject: Re: Foxpro: Reporting/Querying on most recent date in DBF
- Distribution: world
- References: <C131HG.4C4@acsu.buffalo.edu>
- Organization: Welcom Software Technology International
- Reply-To: davec@wsti.demon.co.uk
- X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.18)
- Lines: 18
- Date: Thu, 21 Jan 1993 17:36:03 +0000
- Message-ID: <727655170snz@wsti.demon.co.uk>
- Sender: usenet@demon.co.uk
-
- In article <C131HG.4C4@acsu.buffalo.edu> v125qmam@ubvmsb.cc.buffalo.edu writes:
-
- >Hi all!
- > How can I get Foxpro to point to the record containing the most
- > recent date within a group? For example:
- >
- > The File looks like this:
- >
- > Name C 20
- > Date D 8
- >
- > I want to query the most recent Date associated with a given name.
- > The MAX Function requires a list of possibilites...
-
- SELECT FROM yourdbf MAX(Date) WHERE Name="theNameYouWant" INTO ARRAY target
-
- with an index tag on Name, will do it, although it will scan each
- record with the name you requested to find the maximum date.
-