X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id DAB7C9FA5CE for ; Wed, 7 Jun 2006 20:29:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 80324-05 for ; Wed, 7 Jun 2006 20:29:29 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web33310.mail.mud.yahoo.com (web33310.mail.mud.yahoo.com [68.142.206.125]) by postgresql.org (Postfix) with SMTP id ABEE59FA3C0 for ; Wed, 7 Jun 2006 20:29:29 -0300 (ADT) Received: (qmail 51861 invoked by uid 60001); 7 Jun 2006 23:29:28 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=P6NpmhWjgo7mmcOUtaTUWBtWwPTpwLhgOu7xLqenDdgKwzdGBJtlFymIvHKpkppksGRckn4xWN89/F9MCdm+bCCN27l0zBDsbwzx1uY7EgBMhLkrbmB1pzmwN1TtA0m17OlqRxb1rMkcp5h7av2b3qfKOVbP7DamfLNsSmtlXjA= ; Message-ID: <20060607232928.51859.qmail@web33310.mail.mud.yahoo.com> Received: from [12.9.179.126] by web33310.mail.mud.yahoo.com via HTTP; Wed, 07 Jun 2006 16:29:28 PDT Date: Wed, 7 Jun 2006 16:29:28 -0700 (PDT) From: Subject: Re: How To Exclude True Values To: Richard Broersma Jr , "pgsql-sql@postgresql.org" In-Reply-To: <20060607202551.45517.qmail@web31814.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/90 X-Sequence-Number: 25326 > > Richard, > > > > i got the expected rewsults! now i just have to > study > > the query to figure out what it does. -lol- > > > > i tried using AS, but i only did it in one place - > > doh! the error message just moved to the next > place i > > didn't do it. i'll know better next time. > > > > thanks for the help. > > I am surprised that the query did not work the first > time without the optional AS keyword. I > would be interested in knowing why your server > requires the AS and mine doesn't. my dev box is winxp home with pgsql 8.1.3 (i think it is .3, anyway). if platform issues don't expain it, then i don't know what it is. i think i've figured out the gist of the thought process behind the SQL query... 1. select everything from t_inspect_result as table a 2. select max timestamp value entries in t_inspect_result as table b 3. choose only choose those rows where the max timestamps of table a and b are equal. is that about it? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com