🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #11107

Re: JOIN and max query

#11107
From: Craig Stuntz TeamB
Date: Thu, 12 Dec 2002 19:24
20 lines
1936 bytes
In article <3df8cd46$1@newsgroups.borland.com>, "DP" <daveperkins@_woo-
hoo"-'#-bigfoot.com> says...
> It does what I wanted, I was just trying to figure out how.
> 
	Ah, OK.  Well, look at the second part of the WHERE clause.  That 
will only return TRUE if there's a matching record.  But you want the 
clause as a whole to return TRUE if either:

o  There is no matching record, or:
o  There is a matching record, and it corresponds to the max date.

	Hence the two parts of the WHERE clause.

	-Craig

-- 
Craig Stuntz [TeamB] � Vertex Systems Corp. � Columbus, OH
Delphi/InterBase Weblog : http://delphi.weblogs.com
InterBase Perf. Monitor : http://delphi.weblogs.com/IBPerformanceMonitor
InterBase PLANalyzer 1.1: http://delphi.weblogs.com/IBPLANalyzer
Technical Details
Message-ID: <MPG.1862aa98c0da5c8e98a3c8@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!logbridge.uoregon.edu!uunet!sea.uu.net!sac.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3df8712d@newsgroups.borland.com> <MPG.186277cf430b97fa98a3b9@newsgroups.borland.com> <3df8c053$1@newsgroups.borland.com> <MPG.18628e86c833192498a3c0@newsgroups.borland.com> <3df8cd46$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 114a0e,54ae09d94673db75
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-12-12 11:34:16 PST
From: Craig Stuntz [TeamB] <cstuntz@nospamplease.com  (but use vertexsoftware to email)>
Newsgroups: borland.public.interbase.sql
Subject: Re: JOIN and max query
Date: Thu, 12 Dec 2002 14:24:14 -0500
Message-ID: <MPG.1862aa98c0da5c8e98a3c8@newsgroups.borland.com>
References: <3df8712d@newsgroups.borland.com> <MPG.186277cf430b97fa98a3b9@newsgroups.borland.com> <3df8c053$1@newsgroups.borland.com> <MPG.18628e86c833192498a3c0@newsgroups.borland.com> <3df8cd46$1@newsgroups.borland.com>
Organization: Vertex Systems Corporation
X-Newsreader: MicroPlanet Gravity v2.60
NNTP-Posting-Host: 65.86.87.242
X-Trace: newsgroups.borland.com 1039721062 65.86.87.242 (12 Dec 2002 11:24:22 -0800)
Lines: 20
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!logbridge.uoregon.edu!uunet!sea.uu.net!sac.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail