Received: from ganesh.paneris.org (IDENT:root@paneris.org [194.128.98.74]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA69042 for ; Wed, 17 Nov 1999 13:17:41 -0500 (EST) (envelope-from tim@hoop.co.uk) Received: from noonoo (flav1.dircon.co.uk [194.112.47.31]) by ganesh.paneris.org (8.8.7/8.8.7) with SMTP id SAA31452; Wed, 17 Nov 1999 18:15:45 GMT Message-ID: <006301bf3128$9dfa4260$0501a8c0@noonoo> From: "Tim Joyce" To: , "Robert Hiltibidal" Cc: References: <3.0.6.32.19991117111814.0095ba20@y2k.state.il.us> Subject: Re: [INTERFACES] Postgres Date Functions Date: Wed, 17 Nov 1999 18:18:38 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Select * from tblApplication order by EntryDate desc LIMIT 1 should work timj ----- Original Message ----- From: Robert Hiltibidal To: Cc: Sent: 17 November 1999 17:18 Subject: [INTERFACES] Postgres Date Functions > Afternoon, > > Here's a thorny problem: > > Given I have a field called entrydate and is set to type datetime, what is > the best way to pull the latest entry into that record basing the query off > of entrydate? > > Currently I am using something like: > > Select * from tblApplication order by EntryDate desc > > That query pulls all the records. I wish to pull only one. > > Thanks, > > -Rob > > > ************