pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Gary Stainburn <gary.stainburn@ringways.co.uk>
Cc: Ian Barwick <barwick@gmx.de>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: in-date news items
Date: Tue, 12 Mar 2002 10:23:38 -0800 (PST)
Message-ID: <20020312102311.K65916-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <E16kpvs-0007Mm-00@stan.ringways.co.uk>


> Thanks for that Ian, worked a treat.  However, can someone tell me why
>
> select n.ntimestamp, n.nmid from news n where n.ntimestamp > current_time -
> interval '5 minutes';
>
> works while
>
> select n.ntimestamp, n.nmid, m.mfname, m.mlname
>   from news n, members m
>   order by ntimestamp desc
>   limit 1
>   where (n.nmid = m.mid) and
>      (n.ntimestamp > current_time - interval '5 minutes');
>
> has a parse error at or near "where"

The where clause should go between the from and order by.





view thread (7+ messages)

Message-ID: <20020312102311.K65916-100000@megazone23.bigpanda.com>
Permalink:  ../20020312102311.K65916-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20020312102311.K65916-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, gary.stainburn@ringways.co.uk, barwick@gmx.de
  Subject: Re: in-date news items
  In-Reply-To: <20020312102311.K65916-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox