Re: filtering groups
- From: zoe1982 <zoe1982.1pz069@xxxxxxxxxxxx>
- Date: Wed, 1 Jun 2005 09:08:28 -0500
Ok, I'm in need of a little help... I know this is a simple task, but I
need a push since my brain isn't working... I have a database that
allows officers to give tickets to violators... I'm trying to create a
query that joins the violators table (violatorID (primary key), and
OperatorLicenseNumber) and the violations table (violatorID(foreign
key), DateTimeViolation)... I want to be able to return the last record
of a datetimeviolation, and the operatorlicensenumber of that last
violation. How would I go about putting it into code? So far, I've
got:
SELECT a.ViolatorID, OperatorLicenseNumber, DateTimeViolation
FROM Violators AS a INNER JOIN Violations AS b
ON a.ViolatorID = b.ViolatorID
but how do I pull up the last datetimeviolation, along with showing the
violators operatorlicensenumber?
Ugh... I love SQL, but help!
--
zoe1982
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message948760.html
.
- Follow-Ups:
- Re: filtering groups
- From: Hugo Kornelis
- Re: filtering groups
- Prev by Date: Rename a primary key column
- Next by Date: Wildcard with Update
- Previous by thread: Rename a primary key column
- Next by thread: Re: filtering groups
- Index(es):
Relevant Pages
|
|