Re: in-date news items - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: in-date news items
Date
Msg-id 20020312102311.K65916-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: in-date news items  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
List pgsql-sql
> 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.




pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: in-date news items
Next
From: Daniel Ordobas Bortolas
Date:
Subject: simple problem