pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
To: Jeff MacDonald <jeff@pgsql.com>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: query failed , don't know why
Date: Sat, 24 Jun 2000 03:31:20 +0000
Message-ID: <39542B87.EEC820FD@alumni.caltech.edu> (raw)
References: <Pine.BSF.4.21.0006231549310.280-100000@rage.hub.org>

> UPDATE members m,payments p SET m.status = 2
>  WHERE p.paydate > 'now'::datetime - '1 month'::timespan
>   and p.productid = 'xxxxxxx' and m.gid = p.gid

Try

UPDATE members set status = 2
 FROM payments p
 WHERE p.paydate > timestamp 'now' - interval '1 month'
  AND p.productid = 'xxxxxxx' and members.gid = p.gid;



view thread (4+ messages)  latest in thread

Message-ID: <39542B87.EEC820FD@alumni.caltech.edu>
Permalink:  ../39542B87.EEC820FD@alumni.caltech.edu/
Also on:    postgresql.org/message-id/39542B87.EEC820FD@alumni.caltech.edu

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: lockhart@alumni.caltech.edu, jeff@pgsql.com, pgsql-hackers@postgresql.org
  Subject: Re: query failed , don't know why
  In-Reply-To: <39542B87.EEC820FD@alumni.caltech.edu>
  References: <Pine.BSF.4.21.0006231549310.280-100000@rage.hub.org> <39542B87.EEC820FD@alumni.caltech.edu>

* 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