🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #4483

query question...

#4483
From: Paolo Casagrande
Date: Wed, 09 Jan 2002 06:33
18 lines
1482 bytes
Can I select some rows from many only if the value of a column is the
maximun?

I have tree table: Person, Link, Address.
Link is a table that link one Person to many people (for ex. a Parent with
Childs). Address is a table with the address of any people (any address came
with a date).

I know how to extract all people linked to the ID of one

select Person.*, Link.*
from Person, Link
where Link.IDPerson=:ID and Link.IDLink = Person.ID

but how can I extract also last address for each? (last address has maximum
date, that can be null is I have only one address)

thanks, Paolo
Technical Details
Message-ID: <3c3be428$1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,1864a6c4f98ed15,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-01-08 22:36:35 PST
From: "Paolo Casagrande" <nemesis@intelly.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: query question...
Date: Wed, 9 Jan 2002 07:33:23 +0100
Lines: 20
Organization: intellySoft
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 151.25.89.213
Message-ID: <3c3be428$1_1@dnews>
X-Trace: dnews 1010557992 151.25.89.213 (8 Jan 2002 22:33:12 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews