X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id E4CA69FA5C8 for ; Thu, 1 Jun 2006 16:30:37 -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 57782-01 for ; Thu, 1 Jun 2006 16:30:33 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by postgresql.org (Postfix) with ESMTP id A30AF9FA040 for ; Thu, 1 Jun 2006 16:30:33 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id a2so217214ugf for ; Thu, 01 Jun 2006 12:30:32 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=bixIzarAelSWj8FCQYBrxNgfZ3Hn3jg6KIwISttCqJY+T4KAZ1Hv5M2TNr7uIZjmD3bVo8o1OGrcYD/l4P4HzQc2fCv9eXfXefqaQIZGl6J92/n1QEycgsZHbVX0LU1UGz75lX+M5wYTHeYqv2lbqhiAtD2IdaeclZPgk9ZEh+A= Received: by 10.67.30.6 with SMTP id h6mr67824ugj; Thu, 01 Jun 2006 12:30:31 -0700 (PDT) Received: by 10.67.20.12 with HTTP; Thu, 1 Jun 2006 12:30:31 -0700 (PDT) Message-ID: Date: Thu, 1 Jun 2006 14:30:31 -0500 From: "Aaron Bono" To: "Yasir Malik" Subject: Re: Am I crazy or is this SQL not possible Cc: PostgreSQL In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <447F34B1.5020004@oisinglynn.com> X-Google-Sender-Auth: 3a10c6bb1c6a2e59 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/23 X-Sequence-Number: 25259 It is a hack, but when someone wants you to do something in a way different from the norm, aren't they asking for a hack? SQL Server does something like select top (1) from .... I am thinking this is NOT a SQL-99 standard. -Aaron On 6/1/06, Yasir Malik wrote: > > select max(date_sent) from table; > > would equal > > select date_sent from broadcast_history order by date_sent DESC limit 1; > > > That sounds like a hack. Is limit a SQL-99 standard? Is there are > another way to do this? > Sorry to take over your topic, Collin. > > Thanks, > Yasir