Received: from stan.ringways.co.uk (unknown [213.38.87.130]) by postgresql.org (Postfix) with ESMTP id A9AFF474E49 for ; Tue, 12 Mar 2002 07:18:03 -0500 (EST) Received: from gary.ringways.co.uk ([10.1.1.2] helo=there) by stan.ringways.co.uk with smtp (Exim 3.33 #2) id 16klCx-0005A6-00 for pgsql-sql@postgresql.org; Tue, 12 Mar 2002 12:16:47 +0000 Content-Type: text/plain; charset="iso-8859-1" From: Gary Stainburn Organization: Ringways Garages Ltd To: "pgsql-sql" Subject: in-date news items Date: Tue, 12 Mar 2002 12:17:05 +0000 X-Mailer: KMail [version 1.3.2] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: X-Archive-Number: 200203/117 X-Sequence-Number: 6998 Hi all, I'm trying to use a select to get the latest item of news, provided that it's within the last X days. What do I need to add to the where clause for the select statement below: select ndate, nauthor, nheading from news order by ndate desc limit 1 *** where ndate within the last 3 months ****** ; -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000